Interface RateLimitPolicyFactory
- All Superinterfaces:
Serializable
Implement this interface to create a
RateLimitPolicy
. Used to create a rate limiter for
each shard. The factory will be called from multiple threads, so if it returns a singleton
instance of RateLimitPolicy then that instance should be thread-safe, otherwise it should return
separate RateLimitPolicy instances.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Default rate limiter that throttles reading from a shard using an exponential backoff if the response is empty or if the consumer is throttled by AWS.static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic RateLimitPolicyFactory
static RateLimitPolicyFactory
withDefaultRateLimiter
(Duration emptySuccessBaseDelay, Duration throttledBaseDelay, Duration maxDelay) static RateLimitPolicyFactory
static RateLimitPolicyFactory
static RateLimitPolicyFactory
withFixedDelay
(Duration delay) static RateLimitPolicyFactory
-
Method Details
-
getRateLimitPolicy
RateLimitPolicy getRateLimitPolicy() -
withoutLimiter
-
withDefaultRateLimiter
-
withDefaultRateLimiter
static RateLimitPolicyFactory withDefaultRateLimiter(Duration emptySuccessBaseDelay, Duration throttledBaseDelay, Duration maxDelay) -
withFixedDelay
-
withFixedDelay
-
withDelay
-