public static final class TokenBucketRetryCondition.Builder extends Object
TokenBucketRetryCondition
.Modifier and Type | Method and Description |
---|---|
TokenBucketRetryCondition |
build()
Build a
TokenBucketRetryCondition using the provided configuration. |
TokenBucketRetryCondition.Builder |
exceptionCostFunction(TokenBucketExceptionCostFunction exceptionCostFunction)
Configure a
TokenBucketExceptionCostFunction 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.
|
public TokenBucketRetryCondition.Builder tokenBucketSize(int tokenBucketSize)
public TokenBucketRetryCondition.Builder exceptionCostFunction(TokenBucketExceptionCostFunction exceptionCostFunction)
TokenBucketExceptionCostFunction
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.public TokenBucketRetryCondition build()
TokenBucketRetryCondition
using the provided configuration.Copyright © 2020. All rights reserved.