Package org.apache.druid.rpc
Interface ServiceRetryPolicy
- All Known Implementing Classes:
SpecificTaskRetryPolicy,StandardRetryPolicy
public interface ServiceRetryPolicy
Used by
ServiceClient to decide whether to retry requests.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the maximum number of desired attempts, orUNLIMITEDif unlimited.longReturns the maximum wait time between retries.longReturns the minimum wait time between retries.booleanretryHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response) Returns whether the given HTTP response can be retried.booleanReturns whether to log the cause of failure before retryingbooleanReturns whether service-not-available, i.e.booleanReturns whether the given exception can be retried.
-
Field Details
-
UNLIMITED
static final int UNLIMITED- See Also:
-
-
Method Details
-
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
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.
-