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