RetryPolicypublic static class RetryPolicies.MultipleLinearRandomRetry extends java.lang.Object implements RetryPolicy
| Modifier and Type | Class | Description |
|---|---|---|
static class |
RetryPolicies.MultipleLinearRandomRetry.Pair |
Pairs of numRetries and sleepSeconds
|
RetryPolicy.RetryAction| Constructor | Description |
|---|---|
MultipleLinearRandomRetry(java.util.List<RetryPolicies.MultipleLinearRandomRetry.Pair> pairs) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object that) |
|
int |
hashCode() |
|
static RetryPolicies.MultipleLinearRandomRetry |
parseCommaSeparatedString(java.lang.String s) |
Parse the given string as a MultipleLinearRandomRetry object.
|
RetryPolicy.RetryAction |
shouldRetry(java.lang.Exception e,
int curRetry,
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.
|
java.lang.String |
toString() |
public MultipleLinearRandomRetry(java.util.List<RetryPolicies.MultipleLinearRandomRetry.Pair> pairs)
public RetryPolicy.RetryAction shouldRetry(java.lang.Exception e, int curRetry, int failovers, boolean isIdempotentOrAtMostOnce) throws java.lang.Exception
RetryPolicyDetermines 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.
shouldRetry in interface RetryPolicye - The exception that caused the method to failcurRetry - 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 furtherpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object that)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static RetryPolicies.MultipleLinearRandomRetry parseCommaSeparatedString(java.lang.String s)
s - input string.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.