Package com.sinch.sdk.models
Enum RetryPolicy
- All Implemented Interfaces:
Serializable,Comparable<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 Summary
Enum ConstantsEnum ConstantDescriptionExponential backoff only: anyRetry-Afterheader is ignored.HonorRetry-Afterwhen the response carries a usable one, otherwise back off.Disable retries.HonorRetry-Afteronly: without a usable one, the response is not retried. -
Method Summary
Modifier and TypeMethodDescriptionstatic RetryPolicyReturns the enum constant of this type with the specified name.static RetryPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
HonorRetry-Afterwhen the response carries a usable one, otherwise back off. -
RETRY_AFTER
HonorRetry-Afteronly: without a usable one, the response is not retried. -
BACKOFF
Exponential backoff only: anyRetry-Afterheader is ignored. -
NONE
Disable retries. The rate-limited response is returned to the caller as-is.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-