Class PendingRequestThrottler
java.lang.Object
com.linkedin.venice.router.throttle.PendingRequestThrottler
This class maintains a simple counter for capacity management.
-
Constructor Details
-
PendingRequestThrottler
public PendingRequestThrottler(long maxPendingRequest)
-
-
Method Details
-
put
public boolean put()When the incomingput()
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()
-