Source:
protected CqlRequestHandler( Statement<?> statement, DefaultSession session, InternalDriverContext context, String sessionLogPrefix) { this.startTimeNanos = System.nanoTime(); this.logPrefix = sessionLogPrefix + "|" + this.hashCode(); LOG.trace("[{}] Creating new handler for request {}", logPrefix, statement); this.statement = statement; this.session = session; this.keyspace = session.getKeyspace().orElse(null); this.context = context; this.executionProfile = Conversions.resolveExecutionProfile(statement, context); this.retryPolicy = context.getRetryPolicy(executionProfile.getName()); this.speculativeExecutionPolicy = context.getSpeculativeExecutionPolicy(executionProfile.getName()); Boolean statementIsIdempotent = statement.isIdempotent(); this.isIdempotent = (statementIsIdempotent == null) ? executionProfile.getBoolean(DefaultDriverOption.REQUEST_DEFAULT_IDEMPOTENCE) : statementIsIdempotent; this.result = new CompletableFuture<>(); this.result.exceptionally( t -> { try { if (t instanceof CancellationException) { cancelScheduledTasks(); } } catch (Throwable t2) { Loggers.warnWithException(LOG, "[{}] Uncaught exception", logPrefix, t2); } return null; }); this.message = Conversions.toMessage(statement, executionProfile, context); this.timer = context.getNettyOptions().getTimer(); this.timeout = statement.getTimeout() != null ? statement.getTimeout() : executionProfile.getDuration(DefaultDriverOption.REQUEST_TIMEOUT); this.scheduledTimeout = scheduleTimeout(timeout); this.activeExecutionsCount = new AtomicInteger(1); this.startedSpeculativeExecutionsCount = new AtomicInteger(0); this.scheduledExecutions = isIdempotent ? new CopyOnWriteArrayList<>() : null; this.inFlightCallbacks = new CopyOnWriteArrayList<>(); this.requestTracker = context.getRequestTracker(); this.sessionMetricUpdater = session.getMetricUpdater(); this.throttler = context.getRequestThrottler(); this.throttler.register(this); this.requestLogFormatter = new RequestLogFormatter(context); }

Target:
protected CqlRequestHandler( Statement<?> statement, DefaultSession session, InternalDriverContext context, String sessionLogPrefix) { this.startTimeNanos = System.nanoTime(); this.logPrefix = sessionLogPrefix + "|" + this.hashCode(); LOG.trace("[{}] Creating new handler for request {}", logPrefix, statement); this.statement = statement; this.session = session; this.keyspace = session.getKeyspace().orElse(null); this.context = context; this.executionProfile = Conversions.resolveExecutionProfile(statement, context); this.retryPolicy = context.getRetryPolicy(executionProfile.getName()); this.speculativeExecutionPolicy = context.getSpeculativeExecutionPolicy(executionProfile.getName()); Boolean statementIsIdempotent = statement.isIdempotent(); this.isIdempotent = (statementIsIdempotent == null) ? executionProfile.getBoolean(DefaultDriverOption.REQUEST_DEFAULT_IDEMPOTENCE) : statementIsIdempotent; this.result = new CompletableFuture<>(); this.result.exceptionally( t -> { try { if (t instanceof CancellationException) { cancelScheduledTasks(); } } catch (Throwable t2) { Loggers.warnWithException(LOG, "[{}] Uncaught exception", logPrefix, t2); } return null; }); this.message = Conversions.toMessage(statement, executionProfile, context); this.timer = context.getNettyOptions().getTimer(); this.timeout = statement.getTimeout() != null ? statement.getTimeout() : executionProfile.getDuration(DefaultDriverOption.REQUEST_TIMEOUT); this.scheduledTimeout = scheduleTimeout(timeout); this.activeExecutionsCount = new AtomicInteger(1); this.startedSpeculativeExecutionsCount = new AtomicInteger(0); this.scheduledExecutions = isIdempotent ? new CopyOnWriteArrayList<>() : null; this.inFlightCallbacks = new CopyOnWriteArrayList<>(); this.requestTracker = context.getRequestTracker(); this.sessionMetricUpdater = session.getMetricUpdater(); this.throttler = context.getRequestThrottler(); this.throttler.register(this); }