@Immutable public class DefaultServiceUnavailableRetryStrategy extends Object implements ServiceUnavailableRetryStrategy
ServiceUnavailableRetryStrategy interface.
that retries 503 (Service Unavailable) responses for a fixed number of times
at a fixed interval.| Constructor and Description |
|---|
DefaultServiceUnavailableRetryStrategy() |
DefaultServiceUnavailableRetryStrategy(int maxRetries,
int retryInterval) |
| Modifier and Type | Method and Description |
|---|---|
long |
getRetryInterval() |
boolean |
retryRequest(HttpResponse response,
int executionCount,
HttpContext context)
Determines if a method should be retried given the response from the target server.
|
public DefaultServiceUnavailableRetryStrategy(int maxRetries,
int retryInterval)
public DefaultServiceUnavailableRetryStrategy()
public boolean retryRequest(HttpResponse response, int executionCount, HttpContext context)
ServiceUnavailableRetryStrategyretryRequest in interface ServiceUnavailableRetryStrategyresponse - the response from the target serverexecutionCount - the number of times this method has been
unsuccessfully executedcontext - the context for the request executiontrue if the method should be retried, false
otherwisepublic long getRetryInterval()
getRetryInterval in interface ServiceUnavailableRetryStrategyCopyright © 1999–2013 The Apache Software Foundation. All rights reserved.