com.amazonaws.services.simpleworkflow.flow.interceptors
Class ExponentialRetryPolicy

java.lang.Object
  extended by com.amazonaws.services.simpleworkflow.flow.interceptors.RetryPolicyBase
      extended by com.amazonaws.services.simpleworkflow.flow.interceptors.ExponentialRetryPolicy
All Implemented Interfaces:
RetryPolicy

public class ExponentialRetryPolicy
extends RetryPolicyBase


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)
           
 void setMaximumAttempts(int maximumAttempts)
           
 void setMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)
           
 void setRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)
           
 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)
           
 ExponentialRetryPolicy withExceptionsToRetry(Collection<Class<? extends Throwable>> exceptionsToRetry)
           
 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

ExponentialRetryPolicy

public ExponentialRetryPolicy(long initialRetryIntervalSeconds)
Method Detail

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.