@Contract(threading=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(org.apache.http.HttpResponse response,
            int executionCount,
            org.apache.http.protocol.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(org.apache.http.HttpResponse response,
                   int executionCount,
                   org.apache.http.protocol.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–2022 The Apache Software Foundation. All rights reserved.