Class TokenBucketRetryCondition.Builder
java.lang.Object
software.amazon.awssdk.core.retry.conditions.TokenBucketRetryCondition.Builder
- Enclosing class:
TokenBucketRetryCondition
Configure and create a
TokenBucketRetryCondition
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build aTokenBucketRetryCondition
using the provided configuration.exceptionCostFunction
(TokenBucketExceptionCostFunction exceptionCostFunction) Configure aTokenBucketExceptionCostFunction
that is used to calculate the number of tokens that should be taken out of the bucket for each specific exception.tokenBucketSize
(int tokenBucketSize) Specify the maximum number of tokens in the token bucket.
-
Method Details
-
tokenBucketSize
Specify the maximum number of tokens in the token bucket. This is also used as the initial value for the number of tokens in the bucket. -
exceptionCostFunction
public TokenBucketRetryCondition.Builder exceptionCostFunction(TokenBucketExceptionCostFunction exceptionCostFunction) Configure aTokenBucketExceptionCostFunction
that is used to calculate the number of tokens that should be taken out of the bucket for each specific exception. These tokens will be returned in case of successful retries. -
build
Build aTokenBucketRetryCondition
using the provided configuration.
-