Package com.linkedin.venice.throttle
Interface VeniceRateLimiter
-
- All Known Implementing Classes:
EventThrottler
,GuavaRateLimiter
,TokenBucket
public interface VeniceRateLimiter
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VeniceRateLimiter.RateLimiterType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getQuota()
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 Detail
-
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()
-
-