Class DefaultRetryToken.Builder
java.lang.Object
software.amazon.awssdk.retries.internal.DefaultRetryToken.Builder
- All Implemented Interfaces:
Buildable
,CopyableBuilder<DefaultRetryToken.Builder,
,DefaultRetryToken> SdkBuilder<DefaultRetryToken.Builder,
DefaultRetryToken>
- Enclosing class:
DefaultRetryToken
public static class DefaultRetryToken.Builder
extends Object
implements CopyableBuilder<DefaultRetryToken.Builder,DefaultRetryToken>
A builder class to create
DefaultRetryToken
instances or to mutate them.-
Method Summary
Modifier and TypeMethodDescriptionaddFailure
(Throwable failure) Adds aThrowable
to the retry-token.build()
Creates a newDefaultRetryToken
with the configured values.capacityAcquired
(int capacityAcquired) Sets the capacity acquired from the token bucket.capacityRemaining
(int capacityRemaining) Sets the capacity remaining in the token bucket after the last acquire.Increments the current attempt count.Sets the scope of the retry token.Sets the state of the retry token.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Method Details
-
scope
Sets the scope of the retry token. -
state
Sets the state of the retry token. -
increaseAttempt
Increments the current attempt count. -
capacityAcquired
Sets the capacity acquired from the token bucket. -
capacityRemaining
Sets the capacity remaining in the token bucket after the last acquire. -
addFailure
Adds aThrowable
to the retry-token. -
build
Creates a newDefaultRetryToken
with the configured values.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<DefaultRetryToken.Builder,
DefaultRetryToken> - Returns:
- an instance of T
-