Class PendingRequestThrottler
- java.lang.Object
-
- com.linkedin.venice.router.throttle.PendingRequestThrottler
-
public class PendingRequestThrottler extends java.lang.Object
This class maintains a simple counter for capacity management.
-
-
Constructor Summary
Constructors Constructor Description PendingRequestThrottler(long maxPendingRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCurrentPendingRequestCount()
boolean
put()
When the incomingput()
exceeds the pre-defined counter, 'false' will be returned.void
take()
The following function will decrease the counter by 1 to recover the capacity.
-
-
-
Method Detail
-
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()
-
-