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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns 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.Builder
builder()
Create aRetryPolicy.Builder
populated with the defaults from theRetryMode.defaultRetryMode()
.static RetryPolicy.Builder
Create aRetryPolicy.Builder
populated with the defaults from the providedRetryMode
.static RetryPolicy
Create aRetryPolicy
using theRetryMode.defaultRetryMode()
defaults.boolean
static RetryPolicy
forRetryMode
(RetryMode retryMode) Create aRetryPolicy
using the providedRetryMode
defaults.int
hashCode()
When usingRetryMode.ADAPTIVE
retry 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 RetryPolicy
none()
Create aRetryPolicy
that will NEVER retry.Retrieve theRetryPolicy.Builder.numRetries(Integer)
configured on the builder.Retrieve theRetryPolicy.Builder.retryCondition(RetryCondition)
configured on the builder.Retrieve theRetryMode
that 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 aRetryPolicy
using theRetryMode.defaultRetryMode()
defaults. -
forRetryMode
Create aRetryPolicy
using the providedRetryMode
defaults. -
none
Create aRetryPolicy
that will NEVER retry. -
builder
Create aRetryPolicy.Builder
populated with the defaults from theRetryMode.defaultRetryMode()
. -
builder
Create aRetryPolicy.Builder
populated with the defaults from the providedRetryMode
. -
retryMode
Retrieve theRetryMode
that was used to determine the defaults for this retry policy. -
isFastFailRateLimiting
When usingRetryMode.ADAPTIVE
retry 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:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<RetryPolicy.Builder,
RetryPolicy> - Returns:
- a builder for type T
-
toString
-
equals
-
hashCode
public int hashCode()
-