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 by
TokenBucketRetryCondition
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 the builder()
.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A helper that can be used to assign exception costs to specific exception types, created viabuilder()
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create an exception cost function using exception type matchers built into the SDK.
-
Method Details
-
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.
-