Package com.amazonaws.retry
Interface RetryPolicy.BackoffStrategy
-
- Enclosing class:
- RetryPolicy
public static interface RetryPolicy.BackoffStrategy
The hook for providing custom back-off strategy to control the sleep time between retries.
-
-
Field Summary
Fields Modifier and Type Field Description static RetryPolicy.BackoffStrategy
NO_DELAY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
delayBeforeNextRetry(AmazonWebServiceRequest originalRequest, AmazonClientException exception, int retriesAttempted)
Returns the delay (in milliseconds) before next retry attempt.
-
-
-
Field Detail
-
NO_DELAY
static final RetryPolicy.BackoffStrategy NO_DELAY
-
-
Method Detail
-
delayBeforeNextRetry
long delayBeforeNextRetry(AmazonWebServiceRequest originalRequest, AmazonClientException exception, int retriesAttempted)
Returns the delay (in milliseconds) before next retry attempt.- Parameters:
originalRequest
- The original request object being executed. For performance reason, this object is not a defensive copy, and caller should not attempt to modify its data.exception
- The exception from the failed request, represented as an AmazonClientException object. There are two types of exception that will be passed to this method:- AmazonServiceException (sub-class of AmazonClientException) indicating a service error
- AmazonClientException caused by an IOException when executing the HTTP request.
retriesAttempted
- The number of times the current request has been attempted (not including the next attempt after the delay).- Returns:
- The delay (in milliseconds) before next retry attempt.
-
-