Class TokenBucketRetryCondition.Builder
- java.lang.Object
-
- software.amazon.awssdk.core.retry.conditions.TokenBucketRetryCondition.Builder
-
- Enclosing class:
- TokenBucketRetryCondition
public static final class TokenBucketRetryCondition.Builder extends Object
Configure and create aTokenBucketRetryCondition
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenBucketRetryCondition
build()
Build aTokenBucketRetryCondition
using the provided configuration.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.TokenBucketRetryCondition.Builder
tokenBucketSize(int tokenBucketSize)
Specify the maximum number of tokens in the token bucket.
-
-
-
Method Detail
-
tokenBucketSize
public TokenBucketRetryCondition.Builder tokenBucketSize(int 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
public TokenBucketRetryCondition build()
Build aTokenBucketRetryCondition
using the provided configuration.
-
-