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 aThrowableto the retry-token.build()Creates a newDefaultRetryTokenwith 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, waitMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods 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 aThrowableto the retry-token. -
build
Creates a newDefaultRetryTokenwith the configured values.- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<DefaultRetryToken.Builder,DefaultRetryToken> - Returns:
- an instance of T
-