public interface ConnectionBackoffStrategy
Throwable
that resulted or by examining the resulting
response (e.g. for its status code).Modifier and Type | Method and Description |
---|---|
boolean |
shouldBackoff(org.apache.hc.core5.http.HttpResponse response)
Determines whether receiving the given
HttpResponse as
a result of request execution should result in a backoff
signal. |
boolean |
shouldBackoff(Throwable t)
Determines whether seeing the given
Throwable as
a result of request execution should result in a backoff
signal. |
boolean shouldBackoff(Throwable t)
Throwable
as
a result of request execution should result in a backoff
signal.t
- the Throwable
that happenedtrue
if a backoff signal should be
givenboolean shouldBackoff(org.apache.hc.core5.http.HttpResponse response)
HttpResponse
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.response
- the HttpResponse
that was receivedtrue
if a backoff signal should be
givenCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.