public final class Throttles extends Object
Constructor and Description |
---|
Throttles(int size,
int maxCommandsPerEventLoop)
Construct throttles.
|
Modifier and Type | Method and Description |
---|---|
void |
addSlot(int index,
int count)
Recover slot(s) from commands that have completed.
|
int |
getAvailable(int index)
Get current number of commands that could be run for a throttle.
|
boolean |
waitForSlot(int index,
int count)
Wait for a throttle's command slot(s).
|
public Throttles(int size, int maxCommandsPerEventLoop)
public boolean waitForSlot(int index, int count)
index
- array indexcount
- count of commands to reservepublic void addSlot(int index, int count)
index
- array indexcount
- count of commands to reclaimpublic int getAvailable(int index)
Copyright ? 2012–2018 Aerospike, Inc. All rights reserved.