public class S3ServiceUnavailableRetryStrategy extends Object implements org.apache.http.client.ServiceUnavailableRetryStrategy
Amazon S3 error handling best
practices recommend to retry any 5xx error when talking to S3. The
DefaultServiceUnavailableRetryStrategy provided by the Apache HTTP client
library does not cover all 5xx errors, only 503.
This class does not currently implement exponential backoff or jitter.
| Constructor and Description |
|---|
S3ServiceUnavailableRetryStrategy(int maxRetries,
long 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 S3ServiceUnavailableRetryStrategy(int maxRetries,
long retryInterval)
maxRetries - maximum number of attempts to make the requestretryInterval - interval (in ms) to wait between retriespublic boolean retryRequest(org.apache.http.HttpResponse response,
int executionCount,
org.apache.http.protocol.HttpContext context)
retryRequest in interface org.apache.http.client.ServiceUnavailableRetryStrategypublic long getRetryInterval()
getRetryInterval in interface org.apache.http.client.ServiceUnavailableRetryStrategyCopyright © 2017 Atlassian. All rights reserved.