Skip to content

Commit

Permalink
Remove unneeded variables in request handler
Browse files Browse the repository at this point in the history
  • Loading branch information
olim7t committed Apr 13, 2018
1 parent d99bcf3 commit 546b28c
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -39,7 +39,6 @@
import com.datastax.oss.driver.api.core.servererrors.ReadTimeoutException;
import com.datastax.oss.driver.api.core.servererrors.UnavailableException;
import com.datastax.oss.driver.api.core.servererrors.WriteTimeoutException;
import com.datastax.oss.driver.api.core.specex.SpeculativeExecutionPolicy;
import com.datastax.oss.driver.internal.core.adminrequest.ThrottledAdminRequestHandler;
import com.datastax.oss.driver.internal.core.adminrequest.UnexpectedResponseException;
import com.datastax.oss.driver.internal.core.channel.DriverChannel;
Expand Down Expand Up @@ -119,7 +118,6 @@ public abstract class CqlRequestHandlerBase implements Throttled {
private final List<ScheduledFuture<?>> scheduledExecutions;
private final List<NodeResponseCallback> inFlightCallbacks;
private final RetryPolicy retryPolicy;
private final SpeculativeExecutionPolicy speculativeExecutionPolicy;
private final RequestThrottler throttler;

// The errors on the nodes that were already tried (lazily initialized on the first error).
Expand Down Expand Up @@ -175,7 +173,6 @@ protected CqlRequestHandlerBase(
this.timeoutFuture = scheduleTimeout(timeout);

this.retryPolicy = context.retryPolicy();
this.speculativeExecutionPolicy = context.speculativeExecutionPolicy();
this.activeExecutionsCount = new AtomicInteger(1);
this.startedSpeculativeExecutionsCount = new AtomicInteger(0);
this.scheduledExecutions = isIdempotent ? new CopyOnWriteArrayList<>() : null;
Expand Down Expand Up @@ -267,9 +264,8 @@ private void cancelScheduledTasks() {
if (this.timeoutFuture != null) {
this.timeoutFuture.cancel(false);
}
List<ScheduledFuture<?>> pendingExecutionsSnapshot = this.scheduledExecutions;
if (pendingExecutionsSnapshot != null) {
for (ScheduledFuture<?> future : pendingExecutionsSnapshot) {
if (scheduledExecutions != null) {
for (ScheduledFuture<?> future : scheduledExecutions) {
future.cancel(false);
}
}
Expand Down

0 comments on commit 546b28c

Please sign in to comment.