class IdempotenceAwareRetryPolicy
A retry policy that avoids retrying non-idempotent statements.
In case of write timeouts or unexpected errors, this policy will always return
rethrowResult()
if the statement is deemed non-idempotent
(see QueryOptions.isIdempotent
).
Augments
Constructor
IdempotenceAwareRetryPolicy
([RetryPolicy
childPolicy])
Creates a new instance of IdempotenceAwareRetryPolicy
.
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.
onRequestError
()If the query is not idempotent, it returns a rethrow decision. Otherwise, it relies on the child policy to decide.
Determines what to do when the driver gets an UnavailableException response from a Cassandra node.
onWriteTimeout
()If the query is not idempotent, it return a rethrow decision. Otherwise, it relies on the child policy to decide.
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
.