Interface VeniceRateLimiter

All Known Implementing Classes:
EventThrottler, GuavaRateLimiter, TokenBucket, VeniceAdaptiveIngestionThrottler

public interface VeniceRateLimiter
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    void
    setQuota(long quota)
    The following methods are used only when checking if the new quota requests are different from the existing quota.
    boolean
    tryAcquirePermit(int units)
    Try to acquire permit for the given rcu.
  • Method Details

    • tryAcquirePermit

      boolean tryAcquirePermit(int units)
      Try to acquire permit for the given rcu. Will not block if permit is not available.
      Parameters:
      units - Number of units to acquire.
      Returns:
      true if permit is acquired, false otherwise.
    • setQuota

      void setQuota(long quota)
      The following methods are used only when checking if the new quota requests are different from the existing quota.
    • getQuota

      long getQuota()