@@ -58,7 +58,7 @@ final class PollingSubscriberConnection extends AbstractApiService implements Ac
5858 Logger .getLogger (PollingSubscriberConnection .class .getName ());
5959
6060 private final String subscription ;
61- private final ScheduledExecutorService executor ;
61+ private final ScheduledExecutorService pollingExecutor ;
6262 private final SubscriberFutureStub stub ;
6363 private final MessageDispatcher messageDispatcher ;
6464 private final int maxDesiredPulledMessages ;
@@ -76,7 +76,7 @@ public PollingSubscriberConnection(
7676 ScheduledExecutorService alarmsExecutor ,
7777 ApiClock clock ) {
7878 this .subscription = subscription ;
79- this .executor = alarmsExecutor ;
79+ this .pollingExecutor = alarmsExecutor ;
8080 stub = SubscriberGrpc .newFutureStub (channel );
8181 messageDispatcher =
8282 new MessageDispatcher (
@@ -119,7 +119,7 @@ public void onFailure(Throwable cause) {
119119 notifyFailed (cause );
120120 }
121121 },
122- executor );
122+ pollingExecutor );
123123 }
124124
125125 @ Override
@@ -146,7 +146,7 @@ public void onSuccess(PullResponse pullResponse) {
146146 if (pullResponse .getReceivedMessagesCount () == 0 ) {
147147 // No messages in response, possibly caught up in backlog, we backoff to avoid
148148 // slamming the server.
149- executor .schedule (
149+ pollingExecutor .schedule (
150150 new Runnable () {
151151 @ Override
152152 public void run () {
@@ -180,7 +180,7 @@ public void onFailure(Throwable cause) {
180180 }
181181 if (StatusUtil .isRetryable (cause )) {
182182 logger .log (Level .WARNING , "Failed to pull messages (recoverable): " , cause );
183- executor .schedule (
183+ pollingExecutor .schedule (
184184 new Runnable () {
185185 @ Override
186186 public void run () {
@@ -199,7 +199,7 @@ public void run() {
199199 }
200200 }
201201 },
202- executor );
202+ pollingExecutor );
203203 }
204204
205205 private boolean isAlive () {
0 commit comments