Class TokenBucketRetryCondition.Builder
java.lang.Object
software.amazon.awssdk.core.retry.conditions.TokenBucketRetryCondition.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aTokenBucketRetryConditionusing the provided configuration.exceptionCostFunction(TokenBucketExceptionCostFunction exceptionCostFunction) Configure aTokenBucketExceptionCostFunctionthat 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 aTokenBucketExceptionCostFunctionthat 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 aTokenBucketRetryConditionusing the provided configuration.
-