Enum RetryPolicy

java.lang.Object
java.lang.Enum<RetryPolicy>
com.sinch.sdk.models.RetryPolicy
All Implemented Interfaces:
Serializable, Comparable<RetryPolicy>

public enum RetryPolicy extends Enum<RetryPolicy>
Strategy used to compute the delay before retrying a rate-limited request: the Retry-After header the server sent, a client-side exponential backoff, or neither.
Since:
2.2
See Also:
  • Enum Constant Details

    • DEFAULT

      public static final RetryPolicy DEFAULT
      Honor Retry-After when the response carries a usable one, otherwise back off.
    • RETRY_AFTER

      public static final RetryPolicy RETRY_AFTER
      Honor Retry-After only: without a usable one, the response is not retried.
    • BACKOFF

      public static final RetryPolicy BACKOFF
      Exponential backoff only: any Retry-After header is ignored.
    • NONE

      public static final RetryPolicy NONE
      Disable retries. The rate-limited response is returned to the caller as-is.
  • Method Details

    • values

      public static RetryPolicy[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static RetryPolicy valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null