class RetryPolicy
Members
Object
RetryPolicy.retryDecision
Determines the retry decision for the retry policies.
- Static
- This member is static
Constructor
RetryPolicy
()Base and default RetryPolicy. Determines what to do when the drivers runs into an specific Cassandra exception
Methods
onReadTimeout
(OperationInfo
info, Number
consistency, Number
received, Number
blockFor, Boolean
isDataPresent)
Determines what to do when the driver gets a ReadTimeoutException response from a Cassandra node.
Defines whether to retry and at which consistency level on an unexpected error.
This method might be invoked in the following situations:
- On a client timeout, while waiting for the server response
(see
socketOptions.readTimeout
), being the error an instance ofOperationTimedOutError
. - On a connection error (socket closed, etc.).
- When the contacted host replies with an error, such as
overloaded
,isBootstrapping
, serverError, etc. In this case, the error is instance ofResponseError
.
Note that when this method is invoked, the driver cannot guarantee that the mutation has been effectively applied server-side; a retry should only be attempted if the request is known to be idempotent.
Determines what to do when the driver gets an UnavailableException response from a Cassandra node.
onWriteTimeout
(OperationInfo
info, Number
consistency, Number
received, Number
blockFor, String
writeType)
Determines what to do when the driver gets a WriteTimeoutException response from a Cassandra node.
rethrowResult
()Returns a DecisionInfo
to callback in error when a err is obtained for a given request.
Returns a DecisionInfo
to retry the request with the given consistency
.