Interface ServiceRetryPolicy

All Known Implementing Classes:
SpecificTaskRetryPolicy, StandardRetryPolicy

public interface ServiceRetryPolicy
Used by ServiceClient to decide whether to retry requests.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the maximum number of desired attempts, or UNLIMITED if unlimited.
    long
    Returns the maximum wait time between retries.
    long
    Returns the minimum wait time between retries.
    boolean
    retryHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response)
    Returns whether the given HTTP response can be retried.
    boolean
    Returns whether to log the cause of failure before retrying
    boolean
    Returns whether service-not-available, i.e.
    boolean
    Returns whether the given exception can be retried.
  • Field Details

  • Method Details

    • maxAttempts

      long maxAttempts()
      Returns the maximum number of desired attempts, or UNLIMITED if 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. empty ServiceLocations.getLocations(), can be retried.