Package org.jclouds.aws.handlers
Class AWSServerErrorRetryHandler
java.lang.Object
org.jclouds.http.handlers.BackoffLimitedRetryHandler
org.jclouds.aws.handlers.AWSServerErrorRetryHandler
- All Implemented Interfaces:
HttpRetryHandler
,IOExceptionRetryHandler
Handles Retryable responses with error codes in the 5xx range
-
Field Summary
Fields inherited from class org.jclouds.http.handlers.BackoffLimitedRetryHandler
INSTANCE, logger
Fields inherited from interface org.jclouds.http.HttpRetryHandler
ALWAYS_RETRY, NEVER_RETRY
Fields inherited from interface org.jclouds.http.IOExceptionRetryHandler
ALWAYS_RETRY, NEVER_RETRY
-
Constructor Summary
ConstructorsConstructorDescriptionAWSServerErrorRetryHandler
(AWSUtils utils, Set<String> retryableServerCodes) -
Method Summary
Modifier and TypeMethodDescriptionvoid
imposeBackoffExponentialDelay
(long period, int pow, int failureCount, int max, String commandDescription) boolean
shouldRetryRequest
(HttpCommand command, HttpResponse response) Return true if the command should be retried.protected boolean
shouldRetryRequestOnError
(HttpCommand command, HttpResponse response, AWSError error) Methods inherited from class org.jclouds.http.handlers.BackoffLimitedRetryHandler
imposeBackoffExponentialDelay, imposeBackoffExponentialDelay, shouldRetryRequest
-
Constructor Details
-
AWSServerErrorRetryHandler
-
-
Method Details
-
shouldRetryRequest
Description copied from interface:HttpRetryHandler
Return true if the command should be retried. This method should only be invoked when the response has failed with a HTTP 5xx error indicating a server-side error.- Specified by:
shouldRetryRequest
in interfaceHttpRetryHandler
- Overrides:
shouldRetryRequest
in classBackoffLimitedRetryHandler
-
shouldRetryRequestOnError
protected boolean shouldRetryRequestOnError(HttpCommand command, HttpResponse response, AWSError error) -
imposeBackoffExponentialDelay
public void imposeBackoffExponentialDelay(long period, int pow, int failureCount, int max, String commandDescription) - Overrides:
imposeBackoffExponentialDelay
in classBackoffLimitedRetryHandler
-