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)
Deprecated.
This method only exists for backward compatibility. Override
onError(Request, Throwable, long, DriverExecutionProfile, Node, String) instead. |
default void |
onError(Request request,
Throwable error,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node,
String requestLogPrefix)
Invoked each time a request fails.
|
default void |
onNodeError(Request request,
Throwable error,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node)
Deprecated.
This method only exists for backward compatibility. Override
onNodeError(Request, Throwable, long, DriverExecutionProfile, Node, String) instead. |
default void |
onNodeError(Request request,
Throwable error,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node,
String requestLogPrefix)
Invoked each time a request fails at the node level.
|
default void |
onNodeSuccess(Request request,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node)
Deprecated.
This method only exists for backward compatibility. Override
onNodeSuccess(Request, long, DriverExecutionProfile, Node, String) instead. |
default void |
onNodeSuccess(Request request,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node,
String requestLogPrefix)
Invoked each time a request succeeds at the node level.
|
default void |
onSuccess(Request request,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node)
Deprecated.
This method only exists for backward compatibility. Override
onSuccess(Request, long, DriverExecutionProfile, Node, String) instead. |
default void |
onSuccess(Request request,
long latencyNanos,
DriverExecutionProfile executionProfile,
Node node,
String requestLogPrefix)
Invoked each time a request succeeds.
|
close
@Deprecated default void onSuccess(@NonNull Request request, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node)
onSuccess(Request, long, DriverExecutionProfile, Node, String)
instead.default void onSuccess(@NonNull Request request, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node, @NonNull String requestLogPrefix)
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.requestLogPrefix
- the dedicated log prefix for this request@Deprecated default void onError(@NonNull Request request, @NonNull Throwable error, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @Nullable Node node)
onError(Request, Throwable, long, DriverExecutionProfile, Node, String)
instead.default void onError(@NonNull Request request, @NonNull Throwable error, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @Nullable Node node, @NonNull String requestLogPrefix)
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 occurredrequestLogPrefix
- the dedicated log prefix for this request@Deprecated default void onNodeError(@NonNull Request request, @NonNull Throwable error, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node)
onNodeError(Request, Throwable, long, DriverExecutionProfile, Node, String)
instead.default void onNodeError(@NonNull Request request, @NonNull Throwable error, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node, @NonNull String requestLogPrefix)
onError(Request,
Throwable, long, DriverExecutionProfile, Node, String)
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.requestLogPrefix
- the dedicated log prefix for this request@Deprecated default void onNodeSuccess(@NonNull Request request, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node)
onNodeSuccess(Request, long, DriverExecutionProfile, Node, String)
instead.default void onNodeSuccess(@NonNull Request request, long latencyNanos, @NonNull DriverExecutionProfile executionProfile, @NonNull Node node, @NonNull String requestLogPrefix)
onSuccess(Request,
long, DriverExecutionProfile, Node, String)
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.requestLogPrefix
- the dedicated log prefix for this requestCopyright © 2017–2019. All rights reserved.