Class DefaultControllerRateLimiter<T>

java.lang.Object
io.kubernetes.client.extended.workqueue.ratelimiter.DefaultControllerRateLimiter<T>
All Implemented Interfaces:
RateLimiter<T>

public class DefaultControllerRateLimiter<T> extends Object implements RateLimiter<T>
DefaultControllerRateLimiter is a default rate limiter for workqueue. It has both overall and per-item rate limiting. The overall is a token bucket and the per-item is exponential
  • Constructor Details

    • DefaultControllerRateLimiter

      public DefaultControllerRateLimiter()
  • Method Details

    • when

      public Duration when(T item)
      Description copied from interface: RateLimiter
      When gets an item and gets to decide how long that item should wait
      Specified by:
      when in interface RateLimiter<T>
      Parameters:
      item - Item that should wait
    • forget

      public void forget(T item)
      Description copied from interface: RateLimiter
      Forget indicates that an item is finished being retried. Doesn't matter whether its for perm failing or for success, we'll stop tracking it
      Specified by:
      forget in interface RateLimiter<T>
      Parameters:
      item - Item will be forget
    • numRequeues

      public int numRequeues(T item)
      Specified by:
      numRequeues in interface RateLimiter<T>
      Returns:
      number of how many failures the item has had