public class StandardRetryPolicy extends Object implements ServiceRetryPolicy
| Modifier and Type | Class and Description |
|---|---|
static class |
StandardRetryPolicy.Builder |
UNLIMITED| Modifier and Type | Method and Description |
|---|---|
static StandardRetryPolicy.Builder |
builder() |
long |
maxAttempts()
Returns the maximum number of desired attempts, or
ServiceRetryPolicy.UNLIMITED if unlimited. |
long |
maxWaitMillis()
Returns the maximum wait time between retries.
|
long |
minWaitMillis()
Returns the minimum wait time between retries.
|
static StandardRetryPolicy |
noRetries() |
boolean |
retryHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response)
Returns whether the given HTTP response can be retried.
|
boolean |
retryNotAvailable()
Returns whether service-not-available, i.e.
|
boolean |
retryThrowable(Throwable t)
Returns whether the given exception can be retried.
|
static StandardRetryPolicy |
unlimited() |
public static StandardRetryPolicy.Builder builder()
public static StandardRetryPolicy unlimited()
public static StandardRetryPolicy noRetries()
public long maxAttempts()
ServiceRetryPolicyServiceRetryPolicy.UNLIMITED if unlimited. A value of 1 means no retries.
Zero is invalid.maxAttempts in interface ServiceRetryPolicypublic long minWaitMillis()
ServiceRetryPolicyminWaitMillis in interface ServiceRetryPolicypublic long maxWaitMillis()
ServiceRetryPolicymaxWaitMillis in interface ServiceRetryPolicypublic boolean retryHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response)
ServiceRetryPolicyretryHttpResponse in interface ServiceRetryPolicypublic boolean retryThrowable(Throwable t)
ServiceRetryPolicyretryThrowable in interface ServiceRetryPolicypublic boolean retryNotAvailable()
ServiceRetryPolicyServiceLocations.getLocations(), can be retried.retryNotAvailable in interface ServiceRetryPolicyCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.