Interface TokenBucketExceptionCostFunction
-
- All Superinterfaces:
Function<SdkException,Integer>
- All Known Implementing Classes:
DefaultTokenBucketExceptionCostFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @ThreadSafe public interface TokenBucketExceptionCostFunction extends Function<SdkException,Integer>
A function used byTokenBucketRetryCondition
to determine how many tokens should be removed from the bucket when an exception is encountered. This can be implemented directly, or using the helper methods provided by thebuilder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
TokenBucketExceptionCostFunction.Builder
A helper that can be used to assign exception costs to specific exception types, created viabuilder()
.
-
-
-
Method Detail
-
builder
static TokenBucketExceptionCostFunction.Builder builder()
Create an exception cost function using exception type matchers built into the SDK. This interface may be implemented directly, or created via a builder.
-
-