Interface RateLimitingQueue<T>
- Type Parameters:
T
- item type
- All Superinterfaces:
DelayingQueue<T>
,WorkQueue<T>
- All Known Implementing Classes:
DefaultRateLimitingQueue
Defines a queue that rate limits items being added to the queue.
The code has been copied from the official client and modified: RateLimitingQueue
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRateLimited
(T item) Adds an item to the work queue after the rate limiter says it is ok.void
Indicates that an item is finished being retried.int
numRequeues
(T item) Returns back how many times the item was requeued.Methods inherited from interface io.micronaut.kubernetes.client.openapi.operator.workqueue.DelayingQueue
addAfter
-
Method Details
-
addRateLimited
Adds an item to the work queue after the rate limiter says it is ok.- Parameters:
item
- item to add
-
forget
Indicates that an item is finished being retried. Doesn't matter whether it is for perm failing or for success, we'll stop the rate limiter from tracking it. This only clears the `rateLimiter`, you still have to call `Done` on the queue.- Parameters:
item
- item which is finished being retried
-
numRequeues
Returns back how many times the item was requeued.- Parameters:
item
- specific item- Returns:
- number of times the item was requeued
-