public interface RateLimiter
Modifier and Type | Method and 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 non-positive rate indicating no limit.
|
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.