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 TokenBucketExceptionCostFunction
build()
Create aTokenBucketExceptionCostFunction
using the values configured on this builder.TokenBucketExceptionCostFunction.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.TokenBucketExceptionCostFunction.Builder
throttlingExceptionCost(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.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
public TokenBucketExceptionCostFunction.Builder defaultExceptionCost(int cost)
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
public TokenBucketExceptionCostFunction build()
Description copied from interface:TokenBucketExceptionCostFunction.Builder
Create aTokenBucketExceptionCostFunction
using the values configured on this builder.- Specified by:
build
in interfaceTokenBucketExceptionCostFunction.Builder
-
-