public class MaxOfRateLimiter<T> extends Object implements RateLimiter<T>
| Constructor and Description |
|---|
MaxOfRateLimiter(List<RateLimiter<T>> rateLimiters) |
MaxOfRateLimiter(RateLimiter<T>... rateLimiters) |
| Modifier and Type | Method and Description |
|---|---|
void |
forget(T item)
Forget indicates that an item is finished being retried.
|
int |
numRequeues(T item) |
Duration |
when(T item)
When gets an item and gets to decide how long that item should wait
|
public MaxOfRateLimiter(List<RateLimiter<T>> rateLimiters)
@SafeVarargs public MaxOfRateLimiter(RateLimiter<T>... rateLimiters)
public Duration when(T item)
RateLimiterwhen in interface RateLimiter<T>item - Item that should waitpublic void forget(T item)
RateLimiterforget in interface RateLimiter<T>item - Item will be forgetpublic int numRequeues(T item)
numRequeues in interface RateLimiter<T>Copyright © 2021. All rights reserved.