public class ExponentialRetryPolicy extends RetryPolicyBase
| コンストラクタと説明 |
|---|
ExponentialRetryPolicy(long initialRetryIntervalSeconds) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
double |
getBackoffCoefficient() |
long |
getInitialRetryIntervalSeconds() |
int |
getMaximumAttempts() |
long |
getMaximumRetryIntervalSeconds() |
long |
getRetryExpirationIntervalSeconds() |
long |
nextRetryDelaySeconds(java.util.Date firstAttempt,
java.util.Date recordedFailure,
int numberOfTries) |
void |
setBackoffCoefficient(double backoffCoefficient)
Coefficient used to calculate the next retry interval.
|
void |
setMaximumAttempts(int maximumAttempts)
Maximum number of attempts.
|
void |
setMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)
Set the upper limit of retry interval.
|
void |
setRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)
Stop retrying after the specified interval.
|
void |
validate()
Performs the following three validation checks for ExponentialRetry
Policy: 1) initialRetryIntervalSeconds is not greater than
maximumRetryIntervalSeconds 2) initialRetryIntervalSeconds is not greater
than retryExpirationIntervalSeconds
|
ExponentialRetryPolicy |
withBackoffCoefficient(double backoffCoefficient) |
ExponentialRetryPolicy |
withExceptionsToExclude(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> exceptionsToRetry)
The exception types that should not be retried.
|
ExponentialRetryPolicy |
withExceptionsToRetry(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> exceptionsToRetry)
The exception types that cause operation being retried.
|
ExponentialRetryPolicy |
withMaximumAttempts(int maximumAttempts) |
ExponentialRetryPolicy |
withMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds) |
ExponentialRetryPolicy |
withRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds) |
getExceptionsToExclude, getExceptionsToRetry, isRetryable, setExceptionsToExclude, setExceptionsToRetrypublic long getInitialRetryIntervalSeconds()
public long getMaximumRetryIntervalSeconds()
public void setMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)
public ExponentialRetryPolicy withMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)
public long getRetryExpirationIntervalSeconds()
public void setRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)
public ExponentialRetryPolicy withRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)
public double getBackoffCoefficient()
public void setBackoffCoefficient(double backoffCoefficient)
initialRetryIntervalSeconds * Math.pow(backoffCoefficient, numberOfTries - 2)public ExponentialRetryPolicy withBackoffCoefficient(double backoffCoefficient)
public int getMaximumAttempts()
public void setMaximumAttempts(int maximumAttempts)
public ExponentialRetryPolicy withMaximumAttempts(int maximumAttempts)
public ExponentialRetryPolicy withExceptionsToRetry(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> exceptionsToRetry)
withExceptionsToRetry クラス内 RetryPolicyBasepublic ExponentialRetryPolicy withExceptionsToExclude(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> exceptionsToRetry)
withExceptionsToExclude クラス内 RetryPolicyBasepublic long nextRetryDelaySeconds(java.util.Date firstAttempt,
java.util.Date recordedFailure,
int numberOfTries)
FlowConstants.NONE means stop
retrying.public void validate()
throws java.lang.IllegalStateException
java.lang.IllegalStateException