public final class NioEventLoop extends EventLoopBase implements Runnable
Constructor and Description |
---|
NioEventLoop(EventPolicy policy,
SelectorProvider provider,
int index)
Construct Aerospike event loop wrapper from NIO Selector.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static ByteBuffer |
createByteBuffer(int size) |
void |
execute(com.aerospike.client.cluster.Cluster cluster,
com.aerospike.client.async.AsyncCommand command)
Execute async command.
|
void |
execute(Runnable command)
Schedule execution of runnable command on event loop.
|
ByteBuffer |
getByteBuffer() |
boolean |
inEventLoop()
Is current thread the event loop thread.
|
void |
putByteBuffer(ByteBuffer byteBuffer) |
void |
run() |
void |
schedule(Runnable command,
long delay,
TimeUnit unit)
Schedule execution of runnable command with delay in milliseconds.
|
void |
schedule(com.aerospike.client.async.ScheduleTask task,
long delay,
TimeUnit unit)
Schedule execution with a reusable ScheduleTask.
|
createState, getIndex, getProcessSize, getQueueSize
public NioEventLoop(EventPolicy policy, SelectorProvider provider, int index) throws IOException
IOException
public void execute(com.aerospike.client.cluster.Cluster cluster, com.aerospike.client.async.AsyncCommand command)
public void execute(Runnable command)
public void schedule(Runnable command, long delay, TimeUnit unit)
public void schedule(com.aerospike.client.async.ScheduleTask task, long delay, TimeUnit unit)
public boolean inEventLoop()
inEventLoop
in interface EventLoop
public static ByteBuffer createByteBuffer(int size)
public ByteBuffer getByteBuffer()
public void putByteBuffer(ByteBuffer byteBuffer)
public void close()
Copyright ? 2012–2018 Aerospike, Inc. All rights reserved.