RetryPolicies.MultipleLinearRandomRetry@Evolving
public interface RetryPolicy
Specifies a policy for retrying method failures. Implementations of this interface should be immutable.
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
RetryPolicy.RetryAction |
Returned by
shouldRetry(Exception, int, int, boolean). |
| Modifier and Type | Method | Description |
|---|---|---|
RetryPolicy.RetryAction |
shouldRetry(java.lang.Exception e,
int retries,
int failovers,
boolean isIdempotentOrAtMostOnce) |
Determines whether the framework should retry a method for the given
exception, and the number of retries that have been made for that operation
so far.
|
RetryPolicy.RetryAction shouldRetry(java.lang.Exception e, int retries, int failovers, boolean isIdempotentOrAtMostOnce) throws java.lang.Exception
Determines whether the framework should retry a method for the given exception, and the number of retries that have been made for that operation so far.
e - The exception that caused the method to failretries - The number of times the method has been retriedfailovers - The number of times the method has failed over to a
different backend implementationisIdempotentOrAtMostOnce - true if the method is
Idempotent or AtMostOnce and so can reasonably be
retried on failover when we don't know if the previous attempt
reached the server or notRetryPolicy.RetryAction with RetryDecision.FAIL if the method
should not be retried, RetryDecision.RETRY if the method
should be retried or RetryDecision.FAILOVER_AND_RETRY
if failover has to be performed before retry.java.lang.Exception - The re-thrown exception e indicating that
the method failed and should not be retried furtherCopyright © 2008–2025 Apache Software Foundation. All rights reserved.