public class ItemExponentialFailureRateLimiter<T> extends Object implements RateLimiter<T>
| Constructor and Description |
|---|
ItemExponentialFailureRateLimiter(Duration baseDelay,
Duration maxDelay) |
| 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 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 © 2022. All rights reserved.