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, loggerFields inherited from interface org.jclouds.http.HttpRetryHandler
ALWAYS_RETRY, NEVER_RETRYFields inherited from interface org.jclouds.http.IOExceptionRetryHandler
ALWAYS_RETRY, NEVER_RETRY -
Constructor Summary
ConstructorsConstructorDescriptionAWSServerErrorRetryHandler(AWSUtils utils, Set<String> retryableServerCodes) -
Method Summary
Modifier and TypeMethodDescriptionvoidimposeBackoffExponentialDelay(long period, int pow, int failureCount, int max, String commandDescription) booleanshouldRetryRequest(HttpCommand command, HttpResponse response) Return true if the command should be retried.protected booleanshouldRetryRequestOnError(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:HttpRetryHandlerReturn 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:
shouldRetryRequestin interfaceHttpRetryHandler- Overrides:
shouldRetryRequestin 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:
imposeBackoffExponentialDelayin classBackoffLimitedRetryHandler
-