|
Did this page help you?Yes No Tell us about it... |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.services.simpleworkflow.flow.interceptors.RetryPolicyBase
com.amazonaws.services.simpleworkflow.flow.interceptors.ExponentialRetryPolicy
public class ExponentialRetryPolicy
Constructor Summary | |
---|---|
ExponentialRetryPolicy(long initialRetryIntervalSeconds)
|
Method Summary | |
---|---|
double |
getBackoffCoefficient()
|
long |
getInitialRetryIntervalSeconds()
|
int |
getMaximumAttempts()
|
long |
getMaximumRetryIntervalSeconds()
|
long |
getRetryExpirationIntervalSeconds()
|
long |
nextRetryDelaySeconds(Date firstAttempt,
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(Collection<Class<? extends Throwable>> exceptionsToRetry)
The exception types that should not be retried. |
ExponentialRetryPolicy |
withExceptionsToRetry(Collection<Class<? extends Throwable>> exceptionsToRetry)
The exception types that cause operation being retried. |
ExponentialRetryPolicy |
withMaximumAttempts(int maximumAttempts)
|
ExponentialRetryPolicy |
withMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)
|
ExponentialRetryPolicy |
withRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)
|
Methods inherited from class com.amazonaws.services.simpleworkflow.flow.interceptors.RetryPolicyBase |
---|
getExceptionsToExclude, getExceptionsToRetry, isRetryable, setExceptionsToExclude, setExceptionsToRetry |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExponentialRetryPolicy(long initialRetryIntervalSeconds)
Method Detail |
---|
public 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(Collection<Class<? extends Throwable>> exceptionsToRetry)
withExceptionsToRetry
in class RetryPolicyBase
public ExponentialRetryPolicy withExceptionsToExclude(Collection<Class<? extends Throwable>> exceptionsToRetry)
withExceptionsToExclude
in class RetryPolicyBase
public long nextRetryDelaySeconds(Date firstAttempt, Date recordedFailure, int numberOfTries)
FlowConstants.NONE
means stop
retrying.public void validate() throws IllegalStateException
IllegalStateException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |