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 Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenBucketExceptionCostFunctionbuild()Create aTokenBucketExceptionCostFunctionusing the values configured on this builder.TokenBucketExceptionCostFunction.BuilderdefaultExceptionCost(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.TokenBucketExceptionCostFunction.BuilderthrottlingExceptionCost(int cost)Specify the number of tokens that should be removed from the token bucket when throttling exceptions (e.g.
-
-
-
Method Detail
-
throttlingExceptionCost
public TokenBucketExceptionCostFunction.Builder throttlingExceptionCost(int cost)
Description copied from interface:TokenBucketExceptionCostFunction.BuilderSpecify 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:
throttlingExceptionCostin interfaceTokenBucketExceptionCostFunction.Builder
-
defaultExceptionCost
public TokenBucketExceptionCostFunction.Builder defaultExceptionCost(int cost)
Description copied from interface:TokenBucketExceptionCostFunction.BuilderSpecify 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:
defaultExceptionCostin interfaceTokenBucketExceptionCostFunction.Builder
-
build
public TokenBucketExceptionCostFunction build()
Description copied from interface:TokenBucketExceptionCostFunction.BuilderCreate aTokenBucketExceptionCostFunctionusing the values configured on this builder.- Specified by:
buildin interfaceTokenBucketExceptionCostFunction.Builder
-
-