public class RetryUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Set<java.lang.String> |
CLOCK_SKEW_ERROR_CODES |
private static java.util.Set<java.lang.String> |
THROTTLING_ERROR_CODES |
Constructor and Description |
---|
RetryUtils() |
Modifier and Type | Method and Description |
---|---|
(package private) static int |
calculateFullJitterBackoff(int retriesAttempted,
int baseDelay,
int maxBackoffTime,
java.util.Random random) |
static boolean |
isClockSkewError(AmazonServiceException ase)
Returns true if the specified exception is a clock skew error.
|
static boolean |
isRequestEntityTooLargeException(AmazonServiceException ase)
Returns true if the specified exception is a request entity too large error.
|
static boolean |
isRetryableServiceException(AmazonServiceException ase)
Returns true if the specified exception is a retryable service side exception.
|
static boolean |
isThrottlingException(AmazonServiceException ase)
Returns true if the specified exception is a throttling error.
|
private static final java.util.Set<java.lang.String> THROTTLING_ERROR_CODES
private static final java.util.Set<java.lang.String> CLOCK_SKEW_ERROR_CODES
public static boolean isRetryableServiceException(AmazonServiceException ase)
ase
- The exception to test.public static boolean isThrottlingException(AmazonServiceException ase)
ase
- The exception to test.public static boolean isRequestEntityTooLargeException(AmazonServiceException ase)
ase
- The exception to test.public static boolean isClockSkewError(AmazonServiceException ase)
ase
- The exception to test.static int calculateFullJitterBackoff(int retriesAttempted, int baseDelay, int maxBackoffTime, java.util.Random random)