Class DefaultLegacyRetryStrategy
java.lang.Object
software.amazon.awssdk.retries.internal.BaseRetryStrategy
software.amazon.awssdk.retries.internal.DefaultLegacyRetryStrategy
- All Implemented Interfaces:
RetryStrategy,DefaultAwareRetryStrategy,LegacyRetryStrategy
@SdkInternalApi
public final class DefaultLegacyRetryStrategy
extends BaseRetryStrategy
implements LegacyRetryStrategy
-
Nested Class Summary
Nested Classes -
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
Modifier and TypeMethodDescriptionbuilder()Create a newLegacyRetryStrategy.Builder.protected intexceptionCost(RefreshRetryTokenRequest request) Returns the amount of tokens to withdraw from the token bucket.Methods inherited from class software.amazon.awssdk.retries.internal.BaseRetryStrategy
acquireInitialToken, addDefaults, computeAcquireFailureBackoff, computeBackoff, computeInitialBackoff, hasRetryPredicates, maxAttempts, recordSuccess, refreshRetryToken, retryPredicates, shouldAddDefaults, toString, updateStateForRetry, updateStateForSuccess, useClientDefaultsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.retries.api.RetryStrategy
acquireInitialToken, maxAttempts, recordSuccess, refreshRetryToken, useClientDefaults
-
Method Details
-
exceptionCost
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
- Specified by:
toBuilderin interfaceLegacyRetryStrategy- Specified by:
toBuilderin interfaceRetryStrategy
-
builder
Description copied from interface:LegacyRetryStrategyCreate a newLegacyRetryStrategy.Builder.Example Usage
LegacyRetryStrategy retryStrategy = LegacyRetryStrategy.builder() .retryOnExceptionInstanceOf(IllegalArgumentException.class) .retryOnExceptionInstanceOf(IllegalStateException.class) .build();
-