Package com.aerospike.client.async
Interface EventLoop
- All Known Implementing Classes:
EventLoopBase,NettyEventLoop,NioEventLoop
public interface EventLoop
Aerospike event loop interface.
-
Method Summary
Modifier and TypeMethodDescriptioncom.aerospike.client.async.AsyncConnectorcreateConnector(com.aerospike.client.cluster.Cluster cluster, Node node, com.aerospike.client.async.AsyncConnector.Listener listener) Create async connector command.com.aerospike.client.async.EventStateFor internal use only.voidexecute(com.aerospike.client.cluster.Cluster cluster, com.aerospike.client.async.AsyncCommand command) Execute async command.voidSchedule execution of runnable command on event loop.voidexecuteBatchRetry(Runnable other, com.aerospike.client.async.AsyncCommand command, long deadline) Retry async batch command.intgetIndex()Return event loop array index.intReturn the approximate number of commands currently being processed on the event loop.intReturn the approximate number of commands stored on this event loop's delay queue that have not been started yet.booleanIs current thread the event loop thread.voidSchedule execution with a reusable ScheduleTask.voidSchedule execution of runnable command with delay.
-
Method Details
-
execute
void execute(com.aerospike.client.cluster.Cluster cluster, com.aerospike.client.async.AsyncCommand command) Execute async command. Execute immediately if in event loop. Otherwise, place command on event loop queue. -
execute
Schedule execution of runnable command on event loop. Command is placed on event loop queue and is never executed directly. -
executeBatchRetry
void executeBatchRetry(Runnable other, com.aerospike.client.async.AsyncCommand command, long deadline) Retry async batch command. For internal use only. -
schedule
Schedule execution of runnable command with delay. -
schedule
Schedule execution with a reusable ScheduleTask. -
createConnector
com.aerospike.client.async.AsyncConnector createConnector(com.aerospike.client.cluster.Cluster cluster, Node node, com.aerospike.client.async.AsyncConnector.Listener listener) Create async connector command. -
getProcessSize
int getProcessSize()Return the approximate number of commands currently being processed on the event loop. The value is approximate because the call may be from a different thread than the event loop’s thread and there are no locks or atomics used. If accuracy is important and not running in the event loop thread, the slower execute(Runnable) can be called to run this method in the event loop thread. -
getQueueSize
int getQueueSize()Return the approximate number of commands stored on this event loop's delay queue that have not been started yet. The value is approximate because the call may be from a different thread than the event loop’s thread and there are no locks or atomics used. If accuracy is important and not running in the event loop thread, the slower execute(Runnable) can be called to run this method in the event loop thread. -
getIndex
int getIndex()Return event loop array index. -
inEventLoop
boolean inEventLoop()Is current thread the event loop thread. = -
createState
com.aerospike.client.async.EventState createState()For internal use only.
-