@FunctionalInterface public interface RetryVerdict
RetryPolicy
determining what to do when a request failed. A
verdict contains a RetryDecision
indicating if a retry should be attempted at all and
where, and a method that allows the original request to be modified before the retry.Modifier and Type | Field and Description |
---|---|
static RetryVerdict |
IGNORE
A retry verdict that ignores the error, returning and empty result set to the caller.
|
static RetryVerdict |
RETHROW
A retry verdict that rethrows the execution error to the calling code.
|
static RetryVerdict |
RETRY_NEXT
A retry verdict that retries the same request on the next node in the query plan.
|
static RetryVerdict |
RETRY_SAME
A retry verdict that retries the same request on the same node.
|
Modifier and Type | Method and Description |
---|---|
RetryDecision |
getRetryDecision() |
default <RequestT extends Request> |
getRetryRequest(RequestT previous)
Returns the request to retry, based on the request that was just executed (and failed).
|
static final RetryVerdict RETRY_SAME
static final RetryVerdict RETRY_NEXT
static final RetryVerdict IGNORE
static final RetryVerdict RETHROW
@NonNull RetryDecision getRetryDecision()
@NonNull default <RequestT extends Request> RequestT getRetryRequest(@NonNull RequestT previous)
The default retry policy always returns the request as is. Custom retry policies can use this method to customize the request to retry, for example, by changing its consistency level, query timestamp, custom payload, or even its execution profile.
RequestT
- The actual type of the request.previous
- The request that was just executed (and failed).Copyright © 2017–2024. All rights reserved.