Package org.apache.druid.rpc
Interface ServiceRetryPolicy
-
- All Known Implementing Classes:
SpecificTaskRetryPolicy,StandardRetryPolicy
public interface ServiceRetryPolicyUsed byServiceClientto decide whether to retry requests.
-
-
Field Summary
Fields Modifier and Type Field Description static intUNLIMITED
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longmaxAttempts()Returns the maximum number of desired attempts, orUNLIMITEDif unlimited.longmaxWaitMillis()Returns the maximum wait time between retries.longminWaitMillis()Returns the minimum wait time between retries.booleanretryHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response)Returns whether the given HTTP response can be retried.booleanretryLoggable()Returns whether to log the cause of failure before retryingbooleanretryNotAvailable()Returns whether service-not-available, i.e.booleanretryThrowable(Throwable t)Returns whether the given exception can be retried.
-
-
-
Field Detail
-
UNLIMITED
static final int UNLIMITED
- See Also:
- Constant Field Values
-
-
Method Detail
-
maxAttempts
long maxAttempts()
Returns the maximum number of desired attempts, orUNLIMITEDif unlimited. A value of 1 means no retries. Zero is invalid.
-
minWaitMillis
long minWaitMillis()
Returns the minimum wait time between retries.
-
maxWaitMillis
long maxWaitMillis()
Returns the maximum wait time between retries.
-
retryHttpResponse
boolean retryHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response)
Returns whether the given HTTP response can be retried. The response will have a non-2xx error code.
-
retryThrowable
boolean retryThrowable(Throwable t)
Returns whether the given exception can be retried.
-
retryLoggable
boolean retryLoggable()
Returns whether to log the cause of failure before retrying
-
retryNotAvailable
boolean retryNotAvailable()
Returns whether service-not-available, i.e. emptyServiceLocations.getLocations(), can be retried.
-
-