org.jclouds.aws.handlers
Class AWSServerErrorRetryHandler

java.lang.Object
  extended by org.jclouds.http.handlers.BackoffLimitedRetryHandler
      extended by org.jclouds.aws.handlers.AWSServerErrorRetryHandler
All Implemented Interfaces:
org.jclouds.http.HttpRetryHandler, org.jclouds.http.IOExceptionRetryHandler

public class AWSServerErrorRetryHandler
extends org.jclouds.http.handlers.BackoffLimitedRetryHandler

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
AWSServerErrorRetryHandler(AWSUtils utils, Set<String> retryableServerCodes)
           
 
Method Summary
 void imposeBackoffExponentialDelay(long period, int pow, int failureCount, int max, String commandDescription)
           
 boolean shouldRetryRequest(org.jclouds.http.HttpCommand command, org.jclouds.http.HttpResponse response)
           
protected  boolean shouldRetryRequestOnError(org.jclouds.http.HttpCommand command, org.jclouds.http.HttpResponse response, AWSError error)
           
 
Methods inherited from class org.jclouds.http.handlers.BackoffLimitedRetryHandler
imposeBackoffExponentialDelay, imposeBackoffExponentialDelay, shouldRetryRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWSServerErrorRetryHandler

@Inject
public AWSServerErrorRetryHandler(AWSUtils utils,
                                         Set<String> retryableServerCodes)
Method Detail

shouldRetryRequest

public boolean shouldRetryRequest(org.jclouds.http.HttpCommand command,
                                  org.jclouds.http.HttpResponse response)
Specified by:
shouldRetryRequest in interface org.jclouds.http.HttpRetryHandler
Overrides:
shouldRetryRequest in class org.jclouds.http.handlers.BackoffLimitedRetryHandler

shouldRetryRequestOnError

protected boolean shouldRetryRequestOnError(org.jclouds.http.HttpCommand command,
                                            org.jclouds.http.HttpResponse response,
                                            AWSError error)

imposeBackoffExponentialDelay

public void imposeBackoffExponentialDelay(long period,
                                          int pow,
                                          int failureCount,
                                          int max,
                                          String commandDescription)
Overrides:
imposeBackoffExponentialDelay in class org.jclouds.http.handlers.BackoffLimitedRetryHandler


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.