@Experimental public class DefaultBackoffStrategy extends Object implements ConnectionBackoffStrategy
ConnectionBackoffStrategy backs off either for a raw
 network socket or connection timeout or if the server explicitly
 sends a 429 (Too Many Requests) or a 503 (Service Unavailable) response.| Constructor and Description | 
|---|
| DefaultBackoffStrategy() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | shouldBackoff(org.apache.hc.core5.http.HttpResponse response)Determines whether receiving the given  HttpResponseas
 a result of request execution should result in a backoff
 signal. | 
| boolean | shouldBackoff(Throwable t)Determines whether seeing the given  Throwableas
 a result of request execution should result in a backoff
 signal. | 
public boolean shouldBackoff(Throwable t)
ConnectionBackoffStrategyThrowable as
 a result of request execution should result in a backoff
 signal.shouldBackoff in interface ConnectionBackoffStrategyt - the Throwable that happenedtrue if a backoff signal should be
   givenpublic boolean shouldBackoff(org.apache.hc.core5.http.HttpResponse response)
ConnectionBackoffStrategyHttpResponse as
 a result of request execution should result in a backoff
 signal. Implementations MUST restrict themselves to examining
 the response header and MUST NOT consume any of the response
 body, if any.shouldBackoff in interface ConnectionBackoffStrategyresponse - the HttpResponse that was receivedtrue if a backoff signal should be
   givenCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.