Class RetryPolicy
java.lang.Object
software.amazon.awssdk.core.retry.RetryPolicy
- All Implemented Interfaces:
ToCopyableBuilder<RetryPolicy.Builder,RetryPolicy>
@Immutable
public final class RetryPolicy
extends Object
implements ToCopyableBuilder<RetryPolicy.Builder,RetryPolicy>
Interface for specifying a retry policy to use when evaluating whether or not a request should be retried. The
builder()} can be used to construct a retry policy from SDK provided policies or policies that directly implement
BackoffStrategy and/or RetryCondition. This is configured on a client via
ClientOverrideConfiguration.Builder.retryPolicy(software.amazon.awssdk.core.retry.RetryPolicy).
When using the builder() the SDK will use default values for fields that are not provided. The default number of
retries and condition is based on the current RetryMode.- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if service-specific conditions are allowed on this policy (e.g.Retrieve the retry condition that aggregates theRetryPolicy.Builder.retryCondition(RetryCondition),RetryPolicy.Builder.numRetries(Integer)andRetryPolicy.Builder.retryCapacityCondition(RetryCondition)configured on the builder.Retrieve theRetryPolicy.Builder.backoffStrategy(BackoffStrategy)configured on the builder.static RetryPolicy.Builderbuilder()Create aRetryPolicy.Builderpopulated with the defaults from theRetryMode.defaultRetryMode().static RetryPolicy.BuilderCreate aRetryPolicy.Builderpopulated with the defaults from the providedRetryMode.static RetryPolicyCreate aRetryPolicyusing theRetryMode.defaultRetryMode()defaults.booleanstatic RetryPolicyforRetryMode(RetryMode retryMode) Create aRetryPolicyusing the providedRetryModedefaults.inthashCode()When usingRetryMode.ADAPTIVEretry mode, this controls the client should immediately fail the request when not enough capacity is immediately available from the rate limiter to execute the request, instead of waiting for capacity to be available.static RetryPolicynone()Create aRetryPolicythat will NEVER retry.Retrieve theRetryPolicy.Builder.numRetries(Integer)configured on the builder.Retrieve theRetryPolicy.Builder.retryCondition(RetryCondition)configured on the builder.Retrieve theRetryModethat was used to determine the defaults for this retry policy.Retrieve theRetryPolicy.Builder.throttlingBackoffStrategy(BackoffStrategy)configured on the builder.Take this object and create a builder that contains all of the current property values of this object.toString()Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
defaultRetryPolicy
Create aRetryPolicyusing theRetryMode.defaultRetryMode()defaults. -
forRetryMode
Create aRetryPolicyusing the providedRetryModedefaults. -
none
Create aRetryPolicythat will NEVER retry. -
builder
Create aRetryPolicy.Builderpopulated with the defaults from theRetryMode.defaultRetryMode(). -
builder
Create aRetryPolicy.Builderpopulated with the defaults from the providedRetryMode. -
retryMode
Retrieve theRetryModethat was used to determine the defaults for this retry policy. -
isFastFailRateLimiting
When usingRetryMode.ADAPTIVEretry mode, this controls the client should immediately fail the request when not enough capacity is immediately available from the rate limiter to execute the request, instead of waiting for capacity to be available. -
additionalRetryConditionsAllowed
public boolean additionalRetryConditionsAllowed()Returns true if service-specific conditions are allowed on this policy (e.g. more conditions may be added by the SDK if they are recommended). -
aggregateRetryCondition
Retrieve the retry condition that aggregates theRetryPolicy.Builder.retryCondition(RetryCondition),RetryPolicy.Builder.numRetries(Integer)andRetryPolicy.Builder.retryCapacityCondition(RetryCondition)configured on the builder. -
retryCondition
Retrieve theRetryPolicy.Builder.retryCondition(RetryCondition)configured on the builder. -
backoffStrategy
Retrieve theRetryPolicy.Builder.backoffStrategy(BackoffStrategy)configured on the builder. -
throttlingBackoffStrategy
Retrieve theRetryPolicy.Builder.throttlingBackoffStrategy(BackoffStrategy)configured on the builder. -
numRetries
Retrieve theRetryPolicy.Builder.numRetries(Integer)configured on the builder. -
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<RetryPolicy.Builder,RetryPolicy> - Returns:
- a builder for type T
-
toString
-
equals
-
hashCode
public int hashCode()
-