Was this page helpful?
ClientMetrics¶
metrics~ClientMetrics
Represents a base class that is used to measure events from the server and the client as seen by the driver.
Methods¶
onAuthenticationError(e)
Method invoked when an authentication error is obtained from the server.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
AuthenticationError | Error | The error encountered. |
onClientTimeoutError(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(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(e)
Method invoked when there is a connection error.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Error | The error encountered. |
onIgnoreError(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(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(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(e)
Method invoked when a read timeout error is obtained from the server.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
ResponseError | The error encountered. |
onReadTimeoutRetry(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(latency)
Method invoked when any response is obtained, the response can be the result of a successful execution or a server-side error.
Parameters:
onSpeculativeExecution()
Method invoked when a speculative execution is started.
onSuccessfulResponse(latency)
Method invoked when a response is obtained successfully.
Parameters:
onUnavailableError(e)
Method invoked when an unavailable error is obtained from the server.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
ResponseError | The error encountered. |
onUnavailableRetry(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(e)
Method invoked when a write timeout error is obtained from the server.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
ResponseError | The error encountered. |
onWriteTimeoutRetry(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. |