public final class RetryOptions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RetryOptions.Builder |
Modifier and Type | Method and Description |
---|---|
RetryOptions |
addDoNotRetry(java.lang.Class<? extends java.lang.Throwable>... doNotRetry) |
long |
calculateSleepTime(long attempt) |
boolean |
equals(java.lang.Object o) |
double |
getBackoffCoefficient() |
java.util.List<java.lang.Class<? extends java.lang.Throwable>> |
getDoNotRetry() |
java.time.Duration |
getExpiration() |
java.time.Duration |
getInitialInterval() |
int |
getMaximumAttempts() |
java.time.Duration |
getMaximumInterval() |
int |
hashCode() |
static RetryOptions |
merge(MethodRetry r,
RetryOptions o)
Merges annotation with explicitly provided RetryOptions.
|
RetryOptions |
merge(RetryOptions o)
The parameter options takes precedence.
|
boolean |
shouldRethrow(java.lang.Throwable e,
long attempt,
long elapsed,
long sleepTime) |
java.lang.String |
toString() |
void |
validate() |
public static RetryOptions merge(MethodRetry r, RetryOptions o)
public RetryOptions merge(RetryOptions o)
@SafeVarargs public final RetryOptions addDoNotRetry(java.lang.Class<? extends java.lang.Throwable>... doNotRetry)
public java.time.Duration getInitialInterval()
public double getBackoffCoefficient()
public java.time.Duration getExpiration()
public int getMaximumAttempts()
public java.time.Duration getMaximumInterval()
public void validate()
public java.util.List<java.lang.Class<? extends java.lang.Throwable>> getDoNotRetry()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public long calculateSleepTime(long attempt)
public boolean shouldRethrow(java.lang.Throwable e, long attempt, long elapsed, long sleepTime)