Class BaseRetryStrategy
java.lang.Object
software.amazon.awssdk.retries.internal.BaseRetryStrategy
- All Implemented Interfaces:
RetryStrategy
,DefaultAwareRetryStrategy
- Direct Known Subclasses:
DefaultAdaptiveRetryStrategy
,DefaultLegacyRetryStrategy
,DefaultStandardRetryStrategy
Generic class that implements that common logic for all the retries strategies with extension points for specific strategies to
tailor the behavior to its needs.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionThis method implements the logic ofRetryStrategy.acquireInitialToken(AcquireInitialTokenRequest)
.addDefaults
(RetryStrategyDefaults retryStrategyDefaults) Add the specified defaults to this retry strategyfinal boolean
Returns true if there are retry predicates configured for this retry strategy.int
Returns the maximum numbers attempts that this retry policy will allow.final RecordSuccessResponse
recordSuccess
(RecordSuccessRequest request) This method implements the logic ofRetryStrategy.recordSuccess(RecordSuccessRequest)
.This method implements the logic ofRetryStrategy.refreshRetryToken(RefreshRetryTokenRequest)
.boolean
shouldAddDefaults
(String defaultPredicateName) toString()
boolean
Returns whether the retry strategy uses default retry predicates.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.retries.api.RetryStrategy
toBuilder
-
Method Details
-
acquireInitialToken
This method implements the logic ofRetryStrategy.acquireInitialToken(AcquireInitialTokenRequest)
.- Specified by:
acquireInitialToken
in interfaceRetryStrategy
- See Also:
-
refreshRetryToken
This method implements the logic ofRetryStrategy.refreshRetryToken(RefreshRetryTokenRequest)
.- Specified by:
refreshRetryToken
in interfaceRetryStrategy
- See Also:
-
recordSuccess
This method implements the logic ofRetryStrategy.recordSuccess(RecordSuccessRequest)
.- Specified by:
recordSuccess
in interfaceRetryStrategy
- See Also:
-
maxAttempts
public int maxAttempts()Description copied from interface:RetryStrategy
Returns the maximum numbers attempts that this retry policy will allow.- Specified by:
maxAttempts
in interfaceRetryStrategy
- Returns:
- the maximum numbers attempts that this retry policy will allow.
-
useClientDefaults
public boolean useClientDefaults()Description copied from interface:RetryStrategy
Returns whether the retry strategy uses default retry predicates.- Specified by:
useClientDefaults
in interfaceRetryStrategy
- Returns:
- true if this retry strategy should use the default retry predicates, false otherwise.
-
hasRetryPredicates
public final boolean hasRetryPredicates()Returns true if there are retry predicates configured for this retry strategy.- Returns:
- true if there are retry predicates configured for this retry strategy.
-
retryPredicates
-
shouldAddDefaults
-
addDefaults
Description copied from interface:DefaultAwareRetryStrategy
Add the specified defaults to this retry strategy- Specified by:
addDefaults
in interfaceDefaultAwareRetryStrategy
- Parameters:
retryStrategyDefaults
- the defaults to add to this strategy- Returns:
- a new retry strategy containing the specified defaults.
-
toString
-