Interface RateLimiter
-
- All Known Implementing Classes:
GuavaRateLimiter
,NullRateLimiter
,SharedRateLimiterFactory.SharedRateLimiter
public interface RateLimiter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
acquire(long permits)
Sleep until the specified number of queries are available.long
getRate()
Get current QPS of the rate limiter, with a nonpositive rate indicating no limit.
-