Class DefaultLegacyRetryStrategy
- java.lang.Object
-
- software.amazon.awssdk.retries.internal.BaseRetryStrategy
-
- software.amazon.awssdk.retries.internal.DefaultLegacyRetryStrategy
-
- All Implemented Interfaces:
RetryStrategy,DefaultAwareRetryStrategy,LegacyRetryStrategy
public final class DefaultLegacyRetryStrategy extends BaseRetryStrategy implements LegacyRetryStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultLegacyRetryStrategy.Builder
-
Field Summary
-
Fields inherited from class software.amazon.awssdk.retries.internal.BaseRetryStrategy
backoffStrategy, circuitBreakerEnabled, defaultsAdded, exceptionCost, log, maxAttempts, retryPredicates, throttlingBackoffStrategy, tokenBucketStore, treatAsThrottling, useClientDefaults
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultLegacyRetryStrategy.Builderbuilder()Create a newLegacyRetryStrategy.Builder.protected intexceptionCost(RefreshRetryTokenRequest request)Returns the amount of tokens to withdraw from the token bucket.DefaultLegacyRetryStrategy.BuildertoBuilder()-
Methods inherited from class software.amazon.awssdk.retries.internal.BaseRetryStrategy
acquireInitialToken, addDefaults, computeBackoff, computeInitialBackoff, hasRetryPredicates, maxAttempts, recordSuccess, refreshRetryToken, retryPredicates, shouldAddDefaults, toString, updateStateForRetry, updateStateForSuccess, useClientDefaults
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.retries.api.RetryStrategy
acquireInitialToken, maxAttempts, recordSuccess, refreshRetryToken, useClientDefaults
-
-
-
-
Method Detail
-
exceptionCost
protected int exceptionCost(RefreshRetryTokenRequest request)
Description copied from class:BaseRetryStrategyReturns the amount of tokens to withdraw from the token bucket. Extending classes can override this method to tailor this amount for the specific kind of failure.- Overrides:
exceptionCostin classBaseRetryStrategy
-
toBuilder
public DefaultLegacyRetryStrategy.Builder toBuilder()
- Specified by:
toBuilderin interfaceLegacyRetryStrategy- Specified by:
toBuilderin interfaceRetryStrategy
-
builder
public static DefaultLegacyRetryStrategy.Builder builder()
Description copied from interface:LegacyRetryStrategyCreate a newLegacyRetryStrategy.Builder.Example Usage
LegacyRetryStrategy retryStrategy = LegacyRetryStrategy.builder() .retryOnExceptionInstanceOf(IllegalArgumentException.class) .retryOnExceptionInstanceOf(IllegalStateException.class) .build();
-
-