Package com.amazonaws.retry
Class PredefinedRetryPolicies
- java.lang.Object
-
- com.amazonaws.retry.PredefinedRetryPolicies
-
public class PredefinedRetryPolicies extends Object
This class includes a set of pre-defined retry policies, including default policies used by SDK.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPredefinedRetryPolicies.SDKDefaultRetryConditionThe default implementation of RetryCondition used by the SDK.
-
Field Summary
Fields Modifier and Type Field Description static RetryPolicyDEFAULTSDK default retry policy (except for AmazonDynamoDBClient, whose constructor will replace the DEFAULT with DYNAMODB_DEFAULT.)static RetryPolicy.BackoffStrategyDEFAULT_BACKOFF_STRATEGYThe SDK default back-off strategy, which increases exponentially up to a max amount of delay.static intDEFAULT_MAX_ERROR_RETRYSDK default max retry countstatic RetryPolicy.RetryConditionDEFAULT_RETRY_CONDITIONThe SDK default retry condition, which checks for various conditions in the following order: Never retry on requests with non-repeatable content; Retry on client exceptions caused by IOException; Retry on service exceptions that are either 500 internal server errors, 503 service unavailable errors, service throttling errors or clock skew errors.static RetryPolicyDYNAMODB_DEFAULTDefault policy for DynamoDB clientstatic RetryPolicy.BackoffStrategyDYNAMODB_DEFAULT_BACKOFF_STRATEGYThe default back-off strategy for DynamoDB client, which increases exponentially up to a max amount of delay.static intDYNAMODB_DEFAULT_MAX_ERROR_RETRYDefault max retry count for DynamoDB clientstatic RetryPolicyNO_RETRY_POLICYNo retry policy
-
Constructor Summary
Constructors Constructor Description PredefinedRetryPolicies()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RetryPolicygetDefaultRetryPolicy()Returns the SDK default retry policy.static RetryPolicygetDefaultRetryPolicyWithCustomMaxRetries(int maxErrorRetry)Returns the SDK default retry policy with the specified max retry count.static RetryPolicygetDynamoDBDefaultRetryPolicy()Returns the default retry policy for DynamoDB client.static RetryPolicygetDynamoDBDefaultRetryPolicyWithCustomMaxRetries(int maxErrorRetry)Returns the default retry policy for DynamoDB client with the specified max retry count.
-
-
-
Field Detail
-
NO_RETRY_POLICY
public static final RetryPolicy NO_RETRY_POLICY
No retry policy
-
DEFAULT_MAX_ERROR_RETRY
public static final int DEFAULT_MAX_ERROR_RETRY
SDK default max retry count- See Also:
- Constant Field Values
-
DEFAULT
public static final RetryPolicy DEFAULT
SDK default retry policy (except for AmazonDynamoDBClient, whose constructor will replace the DEFAULT with DYNAMODB_DEFAULT.)
-
DYNAMODB_DEFAULT_MAX_ERROR_RETRY
public static final int DYNAMODB_DEFAULT_MAX_ERROR_RETRY
Default max retry count for DynamoDB client- See Also:
- Constant Field Values
-
DYNAMODB_DEFAULT
public static final RetryPolicy DYNAMODB_DEFAULT
Default policy for DynamoDB client
-
DEFAULT_RETRY_CONDITION
public static final RetryPolicy.RetryCondition DEFAULT_RETRY_CONDITION
The SDK default retry condition, which checks for various conditions in the following order:- Never retry on requests with non-repeatable content;
- Retry on client exceptions caused by IOException;
- Retry on service exceptions that are either 500 internal server errors, 503 service unavailable errors, service throttling errors or clock skew errors.
-
DEFAULT_BACKOFF_STRATEGY
public static final RetryPolicy.BackoffStrategy DEFAULT_BACKOFF_STRATEGY
The SDK default back-off strategy, which increases exponentially up to a max amount of delay. It also applies a larger scale factor upon service throttling exception.
-
DYNAMODB_DEFAULT_BACKOFF_STRATEGY
public static final RetryPolicy.BackoffStrategy DYNAMODB_DEFAULT_BACKOFF_STRATEGY
The default back-off strategy for DynamoDB client, which increases exponentially up to a max amount of delay. Compared to the SDK default back-off strategy, it applies a smaller scale factor.
-
-
Method Detail
-
getDefaultRetryPolicy
public static RetryPolicy getDefaultRetryPolicy()
Returns the SDK default retry policy. This policy will honor the maxErrorRetry set in ClientConfiguration.
-
getDynamoDBDefaultRetryPolicy
public static RetryPolicy getDynamoDBDefaultRetryPolicy()
Returns the default retry policy for DynamoDB client. This policy will honor the maxErrorRetry set in ClientConfiguration.
-
getDefaultRetryPolicyWithCustomMaxRetries
public static RetryPolicy getDefaultRetryPolicyWithCustomMaxRetries(int maxErrorRetry)
Returns the SDK default retry policy with the specified max retry count.
-
getDynamoDBDefaultRetryPolicyWithCustomMaxRetries
public static RetryPolicy getDynamoDBDefaultRetryPolicyWithCustomMaxRetries(int maxErrorRetry)
Returns the default retry policy for DynamoDB client with the specified max retry count.
-
-