Class DefaultTokenBucketExceptionCostFunction.Builder
java.lang.Object
software.amazon.awssdk.core.internal.retry.DefaultTokenBucketExceptionCostFunction.Builder
- All Implemented Interfaces:
TokenBucketExceptionCostFunction.Builder
- Enclosing class:
DefaultTokenBucketExceptionCostFunction
public static final class DefaultTokenBucketExceptionCostFunction.Builder
extends Object
implements TokenBucketExceptionCostFunction.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create aTokenBucketExceptionCostFunction
using the values configured on this builder.defaultExceptionCost
(int cost) Specify the number of tokens that should be removed from the token bucket when no other exception type in this function is matched.throttlingExceptionCost
(int cost) Specify the number of tokens that should be removed from the token bucket when throttling exceptions (e.g.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
throttlingExceptionCost
Description copied from interface:TokenBucketExceptionCostFunction.Builder
Specify the number of tokens that should be removed from the token bucket when throttling exceptions (e.g. HTTP status code 429) are encountered.- Specified by:
throttlingExceptionCost
in interfaceTokenBucketExceptionCostFunction.Builder
-
defaultExceptionCost
Description copied from interface:TokenBucketExceptionCostFunction.Builder
Specify the number of tokens that should be removed from the token bucket when no other exception type in this function is matched. This field is required.- Specified by:
defaultExceptionCost
in interfaceTokenBucketExceptionCostFunction.Builder
-
build
Description copied from interface:TokenBucketExceptionCostFunction.Builder
Create aTokenBucketExceptionCostFunction
using the values configured on this builder.- Specified by:
build
in interfaceTokenBucketExceptionCostFunction.Builder
-