Package com.aerospike.client.async
Class NettyEventLoop
java.lang.Object
com.aerospike.client.async.EventLoopBase
com.aerospike.client.async.NettyEventLoop
- All Implemented Interfaces:
EventLoop
Aerospike wrapper around netty event loop.
Implements the Aerospike EventLoop interface.
-
Constructor Summary
ConstructorDescriptionNettyEventLoop
(EventPolicy policy, io.netty.channel.EventLoop eventLoop, NettyEventLoops parent, int index) Construct Aerospike event loop wrapper from netty event loop. -
Method Summary
Modifier and TypeMethodDescriptioncom.aerospike.client.async.AsyncConnector
createConnector
(com.aerospike.client.cluster.Cluster cluster, Node node, com.aerospike.client.async.AsyncConnector.Listener listener) Create async connector command.void
execute
(com.aerospike.client.cluster.Cluster cluster, com.aerospike.client.async.AsyncCommand command) Execute async command.void
Schedule execution of runnable command on event loop.void
executeBatchRetry
(Runnable other, com.aerospike.client.async.AsyncCommand command, long deadline) Execute async batch retry.io.netty.channel.EventLoop
get()
Return netty event loop.boolean
Is current thread the event loop thread.void
Schedule execution with a reusable ScheduleTask.void
Schedule execution of runnable command with delay.Methods inherited from class com.aerospike.client.async.EventLoopBase
createState, getIndex, getProcessSize, getQueueSize
-
Constructor Details
-
NettyEventLoop
public NettyEventLoop(EventPolicy policy, io.netty.channel.EventLoop eventLoop, NettyEventLoops parent, int index) Construct Aerospike event loop wrapper from netty event loop.
-
-
Method Details
-
get
public io.netty.channel.EventLoop get()Return netty event loop. -
execute
public 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
public void executeBatchRetry(Runnable other, com.aerospike.client.async.AsyncCommand command, long deadline) Execute async batch retry. -
schedule
Schedule execution of runnable command with delay. -
schedule
Schedule execution with a reusable ScheduleTask. -
createConnector
public 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. -
inEventLoop
public boolean inEventLoop()Is current thread the event loop thread. =
-