Package com.linkedin.venice.throttle
Interface VeniceRateLimiter
- All Known Implementing Classes:
EventThrottler
,GuavaRateLimiter
,TokenBucket
,VeniceAdaptiveIngestionThrottler
public interface VeniceRateLimiter
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionlong
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 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()
-