public class LoggingIdempotenceAwareRetryPolicy extends IdempotenceAwareRetryPolicy
RetryPolicy.RetryDecision
Constructor and Description |
---|
LoggingIdempotenceAwareRetryPolicy(RetryPolicy childPolicy)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
init(Cluster cluster)
Gets invoked at cluster startup.
|
protected boolean |
isIdempotent(Statement statement)
Determines whether the given statement is idempotent or not.
|
close, onReadTimeout, onRequestError, onUnavailable, onWriteTimeout
public LoggingIdempotenceAwareRetryPolicy(RetryPolicy childPolicy)
childPolicy
- the policy to wrap.public void init(Cluster cluster)
RetryPolicy
init
in interface RetryPolicy
init
in class IdempotenceAwareRetryPolicy
cluster
- the cluster that this policy is associated with.protected boolean isIdempotent(Statement statement)
IdempotenceAwareRetryPolicy
idempotent flag
;
if this flag is not set, then it inspects
QueryOptions.getDefaultIdempotence()
.
Subclasses may override if they have better knowledge of
the statement being executed.isIdempotent
in class IdempotenceAwareRetryPolicy
statement
- The statement to execute.true
if the given statement is idempotent,
false
otherwise