@Contract(threading=STATELESS) public interface HttpRequestRetryStrategy
| Modifier and Type | Method and Description |
|---|---|
default TimeValue |
getRetryInterval(HttpRequest request,
IOException exception,
int execCount,
HttpContext context)
Determines the retry interval between subsequent retries.
|
TimeValue |
getRetryInterval(HttpResponse response,
int execCount,
HttpContext context)
Determines the retry interval between subsequent retries.
|
boolean |
retryRequest(HttpRequest request,
IOException exception,
int execCount,
HttpContext context)
Determines if a method should be retried after an I/O exception
occurred during execution.
|
boolean |
retryRequest(HttpResponse response,
int execCount,
HttpContext context)
Determines if a method should be retried given the response from
the target server.
|
boolean retryRequest(HttpRequest request, IOException exception, int execCount, HttpContext context)
request - the request failed due to an I/O exceptionexception - the exception that occurredexecCount - the number of times this method has been
unsuccessfully executedcontext - the context for the request executiontrue if the request should be retried, false
otherwiseboolean retryRequest(HttpResponse response, int execCount, HttpContext context)
response - the response from the target serverexecCount - the number of times this method has been
unsuccessfully executedcontext - the context for the request executiontrue if the request should be retried, false
otherwisedefault TimeValue getRetryInterval(HttpRequest request, IOException exception, int execCount, HttpContext context)
request - the request failed due to an I/O exceptionexception - the exception that occurredexecCount - the number of times this method has been
unsuccessfully executedcontext - the context for the request executionTimeValue getRetryInterval(HttpResponse response, int execCount, HttpContext context)
response - the response from the target serverexecCount - the number of times this method has been
unsuccessfully executedcontext - the context for the request executionCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.