Interface RateLimiter<T>

All Known Implementing Classes:
BucketRateLimiter, DefaultControllerRateLimiter, ItemExponentialFailureRateLimiter, ItemFastSlowRateLimiter, MaxOfRateLimiter

public interface RateLimiter<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    forget(T item)
    Forget indicates that an item is finished being retried.
    int
    numRequeues(T item)
     
    when(T item)
    When gets an item and gets to decide how long that item should wait
  • Method Details

    • when

      Duration when(T item)
      When gets an item and gets to decide how long that item should wait
      Parameters:
      item - Item that should wait
    • 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 tracking it
      Parameters:
      item - Item will be forget
    • numRequeues

      int numRequeues(T item)
      Returns:
      number of how many failures the item has had