public class FallthroughRetryPolicy extends Object implements RetryPolicy
All of the methods of this retry policy unconditionally return RetryPolicy.RetryDecision.rethrow().
If this policy is used, retry will have to be implemented in business code.
RetryPolicy.RetryDecision| Modifier and Type | Field and Description |
|---|---|
static FallthroughRetryPolicy |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
RetryPolicy.RetryDecision |
onReadTimeout(Query query,
ConsistencyLevel cl,
int requiredResponses,
int receivedResponses,
boolean dataRetrieved,
int nbRetry)
Defines whether to retry and at which consistency level on a read timeout.
|
RetryPolicy.RetryDecision |
onUnavailable(Query query,
ConsistencyLevel cl,
int requiredReplica,
int aliveReplica,
int nbRetry)
Defines whether to retry and at which consistency level on an
unavailable exception.
|
RetryPolicy.RetryDecision |
onWriteTimeout(Query query,
ConsistencyLevel cl,
WriteType writeType,
int requiredAcks,
int receivedAcks,
int nbRetry)
Defines whether to retry and at which consistency level on a write timeout.
|
public static final FallthroughRetryPolicy INSTANCE
public RetryPolicy.RetryDecision onReadTimeout(Query query, ConsistencyLevel cl, int requiredResponses, int receivedResponses, boolean dataRetrieved, int nbRetry)
onReadTimeout in interface RetryPolicyquery - the original query that timeouted.cl - the original consistency level of the read that timeouted.requiredResponses - the number of responses that were required to
achieve the requested consistency level.receivedResponses - the number of responses that had been received
by the time the timeout exception was raised.dataRetrieved - whether actual data (by opposition to data checksum)
was present in the received responses.nbRetry - the number of retry already performed for this operation.RetryDecision.rethrow().public RetryPolicy.RetryDecision onWriteTimeout(Query query, ConsistencyLevel cl, WriteType writeType, int requiredAcks, int receivedAcks, int nbRetry)
onWriteTimeout in interface RetryPolicyquery - the original query that timeouted.cl - the original consistency level of the write that timeouted.writeType - the type of the write that timeouted.requiredAcks - the number of acknowledgments that were required to
achieve the requested consistency level.receivedAcks - the number of acknowledgments that had been received
by the time the timeout exception was raised.nbRetry - the number of retry already performed for this operation.RetryDecision.rethrow().public RetryPolicy.RetryDecision onUnavailable(Query query, ConsistencyLevel cl, int requiredReplica, int aliveReplica, int nbRetry)
onUnavailable in interface RetryPolicyquery - the original query for which the consistency level cannot
be achieved.cl - the original consistency level for the operation.requiredReplica - the number of replica that should have been
(known) alive for the operation to be attempted.aliveReplica - the number of replica that were know to be alive by
the coordinator of the operation.nbRetry - the number of retry already performed for this operation.RetryDecision.rethrow().Copyright © 2014. All Rights Reserved.