Class NettyEventLoop

java.lang.Object
com.aerospike.client.async.EventLoopBase
com.aerospike.client.async.NettyEventLoop
All Implemented Interfaces:
EventLoop

public final class NettyEventLoop extends EventLoopBase
Aerospike wrapper around netty event loop. Implements the Aerospike EventLoop interface.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyEventLoop(EventPolicy policy, io.netty.channel.EventLoop eventLoop, NettyEventLoops parent, int index)
    Construct Aerospike event loop wrapper from netty event loop.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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(com.aerospike.client.async.ScheduleTask task, long delay, TimeUnit unit)
    Schedule execution with a reusable ScheduleTask.
    void
    schedule(Runnable command, long delay, TimeUnit unit)
    Schedule execution of runnable command with delay.

    Methods inherited from class com.aerospike.client.async.EventLoopBase

    createState, getIndex, getProcessSize, getQueueSize

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void execute(Runnable command)
      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

      public void schedule(Runnable command, long delay, TimeUnit unit)
      Schedule execution of runnable command with delay.
    • schedule

      public void schedule(com.aerospike.client.async.ScheduleTask task, long delay, TimeUnit unit)
      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. =