Class PendingRequestThrottler

java.lang.Object
com.linkedin.venice.router.throttle.PendingRequestThrottler

public class PendingRequestThrottler extends Object
This class maintains a simple counter for capacity management.
  • Constructor Details

    • PendingRequestThrottler

      public PendingRequestThrottler(long maxPendingRequest)
  • Method Details

    • put

      public boolean put()
      When the incoming put() exceeds the pre-defined counter, 'false' will be returned.
      Returns:
    • take

      public void take()
      The following function will decrease the counter by 1 to recover the capacity.
    • getCurrentPendingRequestCount

      public long getCurrentPendingRequestCount()