Interface RateLimitingQueue<T>

All Superinterfaces:
DelayingQueue<T>, WorkQueue<T>
All Known Implementing Classes:
DefaultRateLimitingQueue

public interface RateLimitingQueue<T> extends DelayingQueue<T>
RateLimitingQueue defines a queue that rate limits items being added to the queue.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addRateLimited adds an item to the workqueue after the rate limiter says its ok.
    void
    forget(T item)
    forget indicates that an item is finished being retried.
    int
    numRequeues(T item)
    numRequeues returns back how many times the item was requeued.

    Methods inherited from interface io.kubernetes.client.extended.workqueue.DelayingQueue

    addAfter

    Methods inherited from interface io.kubernetes.client.extended.workqueue.WorkQueue

    add, done, get, isShuttingDown, length, shutDown
  • Method Details

    • addRateLimited

      void addRateLimited(T item)
      addRateLimited adds an item to the workqueue after the rate limiter says its ok.
      Parameters:
      item - item to add
    • forget

      void forget(T item)
      forget indicates that an item is finished being retried. Doesn't matter whether its 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

      int numRequeues(T item)
      numRequeues returns back how many times the item was requeued.
      Parameters:
      item - specific item
      Returns:
      times the item was requeued