IndexThrottlepublic final class SequentialWeightsThrottle extends java.lang.Object implements IndexThrottle
| Constructor | Description |
|---|---|
SequentialWeightsThrottle(int[] weights) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
tryAcquire(int index) |
|
int |
tryAcquire(int index,
int times) |
public SequentialWeightsThrottle(int[] weights)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic final boolean tryAcquire(int index)
tryAcquire in interface IndexThrottlepublic final int tryAcquire(int index,
int times)
tryAcquire in interface IndexThrottle