Interface TokenBucketExceptionCostFunction.Builder
-
- All Known Implementing Classes:
DefaultTokenBucketExceptionCostFunction.Builder
- Enclosing interface:
- TokenBucketExceptionCostFunction
@NotThreadSafe public static interface TokenBucketExceptionCostFunction.BuilderA helper that can be used to assign exception costs to specific exception types, created viaTokenBucketExceptionCostFunction.builder().
-
-
Method Summary
All Methods Instance Methods Abstract 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
TokenBucketExceptionCostFunction.Builder throttlingExceptionCost(int cost)
Specify the number of tokens that should be removed from the token bucket when throttling exceptions (e.g. HTTP status code 429) are encountered.
-
defaultExceptionCost
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. This field is required.
-
build
TokenBucketExceptionCostFunction build()
Create aTokenBucketExceptionCostFunctionusing the values configured on this builder.
-
-