| Constructor | Description |
|---|---|
RateThrottle(double rateLimit) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
tryAcquire() |
Request a permit about a thing
|
int |
tryAcquire(int requiredCount) |
Request permits about a set of things
|
public RateThrottle(double rateLimit)
rateLimit - The rate (permits/sec) limit for the permitspublic final boolean tryAcquire()
ThrottletryAcquire in interface Throttlepublic final int tryAcquire(int requiredCount)
ThrottletryAcquire in interface ThrottlerequiredCount - how many permits is requested