com.amazonaws.services.simpleworkflow.flow.interceptors
Class ExponentialRetryPolicy
java.lang.Object
com.amazonaws.services.simpleworkflow.flow.interceptors.RetryPolicyBase
com.amazonaws.services.simpleworkflow.flow.interceptors.ExponentialRetryPolicy
- All Implemented Interfaces:
- RetryPolicy
public class ExponentialRetryPolicy
- extends RetryPolicyBase
ExponentialRetryPolicy
public ExponentialRetryPolicy(long initialRetryIntervalSeconds)
getInitialRetryIntervalSeconds
public long getInitialRetryIntervalSeconds()
getMaximumRetryIntervalSeconds
public long getMaximumRetryIntervalSeconds()
setMaximumRetryIntervalSeconds
public void setMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)
withMaximumRetryIntervalSeconds
public ExponentialRetryPolicy withMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)
getRetryExpirationIntervalSeconds
public long getRetryExpirationIntervalSeconds()
setRetryExpirationIntervalSeconds
public void setRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)
withRetryExpirationIntervalSeconds
public ExponentialRetryPolicy withRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)
getBackoffCoefficient
public double getBackoffCoefficient()
setBackoffCoefficient
public void setBackoffCoefficient(double backoffCoefficient)
withBackoffCoefficient
public ExponentialRetryPolicy withBackoffCoefficient(double backoffCoefficient)
getMaximumAttempts
public int getMaximumAttempts()
setMaximumAttempts
public void setMaximumAttempts(int maximumAttempts)
withMaximumAttempts
public ExponentialRetryPolicy withMaximumAttempts(int maximumAttempts)
withExceptionsToRetry
public ExponentialRetryPolicy withExceptionsToRetry(Collection<Class<? extends Throwable>> exceptionsToRetry)
- Overrides:
withExceptionsToRetry
in class RetryPolicyBase
withExceptionsToExclude
public ExponentialRetryPolicy withExceptionsToExclude(Collection<Class<? extends Throwable>> exceptionsToRetry)
- Overrides:
withExceptionsToExclude
in class RetryPolicyBase
nextRetryDelaySeconds
public long nextRetryDelaySeconds(Date firstAttempt,
Date recordedFailure,
int numberOfTries)
validate
public void validate()
throws IllegalStateException
- Performs the following three validation checks for ExponentialRetry Policy:
1) initialRetryIntervalSeconds is not greater than maximumRetryIntervalSeconds
2) initialRetryIntervalSeconds is not greater than retryExpirationIntervalSeconds
- Throws:
IllegalStateException
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.