Interface LegacyRetryStrategy.Builder
- All Superinterfaces:
Buildable
,RetryStrategy.Builder<LegacyRetryStrategy.Builder,
,LegacyRetryStrategy> SdkBuilder<LegacyRetryStrategy.Builder,
LegacyRetryStrategy>
- All Known Implementing Classes:
DefaultLegacyRetryStrategy.Builder
- Enclosing interface:
LegacyRetryStrategy
public static interface LegacyRetryStrategy.Builder
extends RetryStrategy.Builder<LegacyRetryStrategy.Builder,LegacyRetryStrategy>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a newRetryStrategy
with the current configuration on this builder.circuitBreakerEnabled
(Boolean circuitBreakerEnabled) Whether circuit breaking is enabled for this strategy.throttlingBackoffStrategy
(BackoffStrategy throttlingBackoffStrategy) Configure the backoff strategy used for throttling exceptions by this strategy.treatAsThrottling
(Predicate<Throwable> treatAsThrottling) Configure the predicate to allow the strategy categorize a Throwable as throttling exception.Methods inherited from interface software.amazon.awssdk.retries.api.RetryStrategy.Builder
backoffStrategy, maxAttempts, retryOnException, retryOnException, retryOnExceptionInstanceOf, retryOnExceptionOrCause, retryOnExceptionOrCauseInstanceOf, retryOnRootCause, retryOnRootCauseInstanceOf, useClientDefaults
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Method Details
-
throttlingBackoffStrategy
Configure the backoff strategy used for throttling exceptions by this strategy.By default, this uses jittered exponential backoff.
- Specified by:
throttlingBackoffStrategy
in interfaceRetryStrategy.Builder<LegacyRetryStrategy.Builder,
LegacyRetryStrategy>
-
circuitBreakerEnabled
Whether circuit breaking is enabled for this strategy.The circuit breaker will prevent attempts (even below the
RetryStrategy.Builder.maxAttempts(int)
) if a large number of failures are observed by this executor.Note: The circuit breaker scope is local to the created
RetryStrategy
, and will therefore not be effective unless theRetryStrategy
is used for more than one call. It's recommended that aRetryStrategy
be reused for all calls to a single unreliable resource. It's also recommended that separateRetryStrategy
s be used for calls to unrelated resources.By default, this is
true
. -
treatAsThrottling
Configure the predicate to allow the strategy categorize a Throwable as throttling exception.- Specified by:
treatAsThrottling
in interfaceRetryStrategy.Builder<LegacyRetryStrategy.Builder,
LegacyRetryStrategy>
-
build
LegacyRetryStrategy build()Description copied from interface:RetryStrategy.Builder
Build a newRetryStrategy
with the current configuration on this builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceRetryStrategy.Builder<LegacyRetryStrategy.Builder,
LegacyRetryStrategy> - Specified by:
build
in interfaceSdkBuilder<LegacyRetryStrategy.Builder,
LegacyRetryStrategy> - Returns:
- an instance of T
-