@Contract(threading=IMMUTABLE) public class StandardServiceUnavailableRetryStrategy extends Object implements org.apache.http.client.ServiceUnavailableRetryStrategy
ServiceUnavailableRetryStrategy
interface.
that retries 408
(Request Timeout), 429
(Too Many Requests),
and 500
(Server side error) responses for a fixed number of times at a fixed interval.Constructor and Description |
---|
StandardServiceUnavailableRetryStrategy(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) |
public StandardServiceUnavailableRetryStrategy(int maxRetries, int retryInterval)
public boolean retryRequest(org.apache.http.HttpResponse response, int executionCount, org.apache.http.protocol.HttpContext context)
retryRequest
in interface org.apache.http.client.ServiceUnavailableRetryStrategy
public long getRetryInterval()
getRetryInterval
in interface org.apache.http.client.ServiceUnavailableRetryStrategy
Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.