public final class EventPolicy extends Object
Modifier and Type | Field and Description |
---|---|
int |
commandsPerEventLoop
Expected number of concurrent asynchronous commands in each event loop that are active at
any point in time.
|
int |
maxCommandsInProcess
Maximum number of async commands that can be processed in each event loop at any point in
time.
|
int |
maxCommandsInQueue
Maximum number of async commands that can be stored in each event loop's delay queue for
later execution.
|
int |
minTimeout
Minimum command timeout in milliseconds that will be specified for this event loop group.
|
int |
queueInitialCapacity
Initial capacity of each event loop's delay queue.
|
int |
ticksPerWheel
The number of ticks per wheel for HashedWheelTimer in each event loop.
|
Constructor and Description |
---|
EventPolicy() |
public int maxCommandsInProcess
If this limit is reached, the next async command will be placed on the event loop's delay queue for later execution. If this limit is zero, all async commands will be executed immediately and the delay queue will not be used.
If defined, a reasonable value is 40. The optimal value will depend on cpu count, cpu speed, network bandwidth and the number of event loops employed.
Default: 0 (execute all async commands immediately)
public int maxCommandsInQueue
If this limit is reached, the next async command will be rejected with exception
AerospikeException.AsyncQueueFull
.
If this limit is zero, all async commands will be accepted into the delay queue.
The optimal value will depend on your application's magnitude of command bursts and the amount of memory available to store commands.
Default: 0 (no delay queue limit)
public int queueInitialCapacity
Default: 256 (if delay queue is used)
public int minTimeout
minTimeout is used to specify the tick duration for HashedWheelTimer in each event loop. minTimeout is also used to specify the direct NIO event loop selector timeout.
Default: 100ms
public int ticksPerWheel
Default: 256
public int commandsPerEventLoop
The real event loop limiting factor is the maximum number of async connections allowed
per node (defined in ClientPolicy.maxConnsPerNode
).
Default: 256
Copyright ? 2012–2018 Aerospike, Inc. All rights reserved.