public final class SequentialWeightsThrottle extends java.lang.Object implements IndexThrottle
| Constructor and Description |
|---|
SequentialWeightsThrottle(int[] weights) |
| Modifier and Type | Method and 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