public interface RateLimitPolicyFactory
extends java.io.Serializable
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.Modifier and Type | Interface and Description |
---|---|
static class |
RateLimitPolicyFactory.DefaultRateLimiter
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 |
RateLimitPolicyFactory.DelayIntervalRateLimiter |
Modifier and Type | Method and Description |
---|---|
RateLimitPolicy |
getRateLimitPolicy() |
static RateLimitPolicyFactory |
withDefaultRateLimiter() |
static RateLimitPolicyFactory |
withDefaultRateLimiter(Duration emptySuccessBaseDelay,
Duration throttledBaseDelay,
Duration maxDelay) |
static RateLimitPolicyFactory |
withDelay(java.util.function.Supplier<Duration> delay) |
static RateLimitPolicyFactory |
withFixedDelay() |
static RateLimitPolicyFactory |
withFixedDelay(Duration delay) |
static RateLimitPolicyFactory |
withoutLimiter() |
RateLimitPolicy getRateLimitPolicy()
static RateLimitPolicyFactory withoutLimiter()
static RateLimitPolicyFactory withDefaultRateLimiter()
static RateLimitPolicyFactory withDefaultRateLimiter(Duration emptySuccessBaseDelay, Duration throttledBaseDelay, Duration maxDelay)
static RateLimitPolicyFactory withFixedDelay()
static RateLimitPolicyFactory withFixedDelay(Duration delay)
static RateLimitPolicyFactory withDelay(java.util.function.Supplier<Duration> delay)