Represents a base class that is used to measure events from the server and the client as seen by the driver.

Methods

onAuthenticationError

(AuthenticationError or Error e)

Method invoked when an authentication error is obtained from the server.

Parameters:
Name Type Description
e AuthenticationError or Error

The error encountered.

onClientTimeoutError

(OperationTimedOutError e)

Method invoked when an error (different than a server or client timeout, authentication or connection error) is encountered when executing a request.

Parameters:
Name Type Description
e OperationTimedOutError

The timeout error.

onClientTimeoutRetry

(Error e)

Method invoked when an execution is retried as a result of a client-level timeout.

Parameters:
Name Type Description
e Error

The error that caused the retry.

onConnectionError

(Error e)

Method invoked when there is a connection error.

Parameters:
Name Type Description
e Error

The error encountered.

onIgnoreError

(Error e)

Method invoked when an error is marked as ignored by the retry policy.

Parameters:
Name Type Description
e Error

The error that was ignored by the retry policy.

onOtherError

(Error e)

Method invoked when an error (different than a server or client timeout, authentication or connection error) is encountered when executing a request.

Parameters:
Name Type Description
e Error

The error encountered.

onOtherErrorRetry

(Error e)

Method invoked when an error (other than a server or client timeout) is retried.

Parameters:
Name Type Description
e Error

The error that caused the retry.

onReadTimeoutError

(ResponseError e)

Method invoked when a read timeout error is obtained from the server.

Parameters:
Name Type Description
e ResponseError

The error encountered.

onReadTimeoutRetry

(Error e)

Method invoked when an execution is retried as a result of a read timeout from the server (coordinator to replica).

Parameters:
Name Type Description
e Error

The error that caused the retry.

onResponse

(Array<Number> latency)

Method invoked when any response is obtained, the response can be the result of a successful execution or a server-side error.

Parameters:
Name Type Description
latency Array<Number>

The latency represented in a [seconds, nanoseconds] tuple Array, where nanoseconds is the remaining part of the real time that can’t be represented in second precision.

onSpeculativeExecution

()

Method invoked when a speculative execution is started.

onSuccessfulResponse

(Array<Number> latency)

Method invoked when a response is obtained successfully.

Parameters:
Name Type Description
latency Array<Number>

The latency represented in a [seconds, nanoseconds] tuple Array, where nanoseconds is the remaining part of the real time that can’t be represented in second precision.

onUnavailableError

(ResponseError e)

Method invoked when an unavailable error is obtained from the server.

Parameters:
Name Type Description
e ResponseError

The error encountered.

onUnavailableRetry

(Error e)

Method invoked when an execution is retried as a result of an unavailable error from the server.

Parameters:
Name Type Description
e Error

The error that caused the retry.

onWriteTimeoutError

(ResponseError e)

Method invoked when a write timeout error is obtained from the server.

Parameters:
Name Type Description
e ResponseError

The error encountered.

onWriteTimeoutRetry

(Error e)

Method invoked when an execution is retried as a result of a write timeout from the server (coordinator to replica).

Parameters:
Name Type Description
e Error

The error that caused the retry.