RateThrottlepublic interface Throttle<X>
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
tryAcquire(X thing) |
Request a permit about a thing
|
int |
tryAcquire(X thing,
int times) |
Request permits about a set of things
|
boolean tryAcquire(X thing)
thing - the subject of the permitint tryAcquire(X thing, int times)
thing - the subject of the permitstimes - how many permits is requested