Class ItemExponentialFailureRateLimiter<T>

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

public class ItemExponentialFailureRateLimiter<T> extends Object implements RateLimiter<T>
ItemExponentialFailureRateLimiter does a simple baseDelay*10num-failures limit dealing with max failures and expiration are up to the caller
  • Constructor Details

    • ItemExponentialFailureRateLimiter

      public ItemExponentialFailureRateLimiter(Duration baseDelay, Duration maxDelay)
  • 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