Package software.amazon.awssdk.retries
Interface LegacyRetryStrategy
-
- All Superinterfaces:
RetryStrategy
- All Known Implementing Classes:
DefaultLegacyRetryStrategy
@ThreadSafe public interface LegacyRetryStrategy extends RetryStrategy
The legacy retry strategy is aRetryStrategyfor normal use-cases.The legacy retry strategy by default:
- Retries on the conditions configured in the
LegacyRetryStrategy.Builder. - Retries 3 times (4 total attempts). Adjust with
RetryStrategy.Builder.maxAttempts(int) - For non-throttling exceptions uses the
BackoffStrategy.exponentialDelay(java.time.Duration, java.time.Duration)backoff strategy, with a base delay of 100 milliseconds and max delay of 20 seconds. Adjust withRetryStrategy.Builder.backoffStrategy(software.amazon.awssdk.retries.api.BackoffStrategy) - For throttling exceptions uses the
BackoffStrategy.exponentialDelayHalfJitter(java.time.Duration, java.time.Duration)backoff strategy, with a base delay of 500 milliseconds and max delay of 20 seconds. Adjust withLegacyRetryStrategy.Builder.throttlingBackoffStrategy(software.amazon.awssdk.retries.api.BackoffStrategy) - Circuit breaking (disabling retries) in the event of high downstream failures within an individual scope. The
circuit breaking will never prevent the first attempt. Adjust with
LegacyRetryStrategy.Builder.circuitBreakerEnabled(java.lang.Boolean) - The state of the circuit breaker is not affected by throttling exceptions
- See Also:
StandardRetryStrategy,AdaptiveRetryStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLegacyRetryStrategy.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static LegacyRetryStrategy.Builderbuilder()Create a newLegacyRetryStrategy.Builder.LegacyRetryStrategy.BuildertoBuilder()-
Methods inherited from interface software.amazon.awssdk.retries.api.RetryStrategy
acquireInitialToken, maxAttempts, recordSuccess, refreshRetryToken, useClientDefaults
-
-
-
-
Method Detail
-
builder
static LegacyRetryStrategy.Builder builder()
Create a newLegacyRetryStrategy.Builder.Example Usage
LegacyRetryStrategy retryStrategy = LegacyRetryStrategy.builder() .retryOnExceptionInstanceOf(IllegalArgumentException.class) .retryOnExceptionInstanceOf(IllegalStateException.class) .build();
-
toBuilder
LegacyRetryStrategy.Builder toBuilder()
- Specified by:
toBuilderin interfaceRetryStrategy
-
-