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.DelayIntervalRateLimiter |
Modifier and Type | Method and Description |
---|---|
RateLimitPolicy |
getRateLimitPolicy() |
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 withFixedDelay()
static RateLimitPolicyFactory withFixedDelay(Duration delay)
static RateLimitPolicyFactory withDelay(java.util.function.Supplier<Duration> delay)