public interface RequestTracker extends AutoCloseable
There is exactly one tracker per Session
. It can be provided either via the
configuration (see reference.conf
in the manual or core driver JAR), or programmatically
via SessionBuilder.withRequestTracker(RequestTracker)
.
Modifier and Type | Method and Description |
---|---|
default void |
onError(Request request,
Throwable error,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node)
Invoked each time a request fails.
|
default void |
onNodeError(Request request,
Throwable error,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node)
Invoked each time a request fails at the node level.
|
default void |
onNodeSuccess(Request request,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node)
Invoked each time a request succeeds at the node level.
|
default void |
onSuccess(Request request,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node)
Invoked each time a request succeeds.
|
close
default void onSuccess(@NonNull Request request, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node)
latencyNanos
- the overall execution time (from the session.execute
call until the result is made available to the client).executionProfile
- the execution profile of this request.node
- the node that returned the successful response.default void onError(@NonNull Request request, @NonNull Throwable error, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @Nullable Node node)
latencyNanos
- the overall execution time (from the session.execute
call until the error is propagated to the client).executionProfile
- the execution profile of this request.node
- the node that returned the error response, or null
if the error occurreddefault void onNodeError(@NonNull Request request, @NonNull Throwable error, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node)
onError(Request,
Throwable, long, DriverExecutionProfile, Node)
but at a per node level.latencyNanos
- the overall execution time (from the session.execute
call until the error is propagated to the client).executionProfile
- the execution profile of this request.node
- the node that returned the error response.default void onNodeSuccess(@NonNull Request request, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node)
onSuccess(Request,
long, DriverExecutionProfile, Node)
but at per Node level.latencyNanos
- the overall execution time (from the session.execute
call until the result is made available to the client).executionProfile
- the execution profile of this request.node
- the node that returned the successful response.Copyright © 2017–2019. All rights reserved.