Interface LegacyRetryStrategy.Builder
- All Superinterfaces:
RetryStrategy.Builder<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 newRetryStrategywith 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
-
Method Details
-
throttlingBackoffStrategy
Configure the backoff strategy used for throttling exceptions by this strategy.By default, this uses jittered exponential backoff.
- Specified by:
throttlingBackoffStrategyin 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 theRetryStrategyis used for more than one call. It's recommended that aRetryStrategybe reused for all calls to a single unreliable resource. It's also recommended that separateRetryStrategys 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:
treatAsThrottlingin interfaceRetryStrategy.Builder<LegacyRetryStrategy.Builder,LegacyRetryStrategy>
-
build
LegacyRetryStrategy build()Description copied from interface:RetryStrategy.BuilderBuild a newRetryStrategywith the current configuration on this builder.- Specified by:
buildin interfaceRetryStrategy.Builder<LegacyRetryStrategy.Builder,LegacyRetryStrategy>
-