ServiceUnavailableRetryStrategy interface.
that retries 503 (Service Unavailable) responses for a fixed number of times
at a fixed interval.
| Modifier and Type | Field and Description |
|---|---|
| private final int | maxRetries
Maximum number of allowed retries if the server responds with a HTTP code in our retry code list. |
| private final long | retryInterval
Retry interval between subsequent requests, in milliseconds. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public boolean | retryRequest(final HttpResponse
the response from the target server response, final int the number of times this method has been
unsuccessfully executed executionCount, final HttpContext the context for the request execution context)Implements org. |
| maxRetries | back to summary |
|---|---|
| private final int maxRetries Maximum number of allowed retries if the server responds with a HTTP code in our retry code list. Default value is 1. | |
| retryInterval | back to summary |
|---|---|
| private final long retryInterval Retry interval between subsequent requests, in milliseconds. Default value is 1 second. | |
| DefaultServiceUnavailableRetryStrategy | back to summary |
|---|---|
| public DefaultServiceUnavailableRetryStrategy(final int maxRetries, final int retryInterval) | |
| DefaultServiceUnavailableRetryStrategy | back to summary |
|---|---|
| public DefaultServiceUnavailableRetryStrategy() | |
| getRetryInterval | back to summary |
|---|---|
| public long getRetryInterval() Implements org.
| |
| retryRequest | back to summary |
|---|---|
| public boolean retryRequest(final HttpResponse response, final int executionCount, final HttpContext context) Implements org. Doc from org. Determines if a method should be retried given the response from the target server.
| |