public interface ExtendedRetryPolicy extends RetryPolicy
This interface exists only for backward compatibility reasons: its methods should really be
defined by RetryPolicy, but adding it after the fact would break binary compatibility.
It should be merged into RetryPolicy in the next major release.
All retry policies shipped with the driver implement this interface.
RetryPolicy.RetryDecision| Modifier and Type | Method and Description |
|---|---|
RetryPolicy.RetryDecision |
onRequestError(Statement statement,
ConsistencyLevel cl,
Exception e,
int nbRetry)
Defines whether to retry and at which consistency level on an
unexpected error.
|
onReadTimeout, onUnavailable, onWriteTimeoutRetryPolicy.RetryDecision onRequestError(Statement statement, ConsistencyLevel cl, Exception e, int nbRetry)
SocketOptions.getReadTimeoutMillis());OVERLOADED, IS_BOOTSTRAPPING, SERVER_ERROR, etc.statement - the original query that failed.cl - the requested consistency level for the operation.
Note that this is not necessarily the achieved consistency level (if any),
and it is never a serial one.e - the exception that caused this request to fail.nbRetry - the number of retries already performed for this operation.RetryDecision.RETHROW is returned,
the DriverException passed to this method will be thrown for the operation.