Class EventLoopBase

java.lang.Object
com.aerospike.client.async.EventLoopBase
All Implemented Interfaces:
EventLoop
Direct Known Subclasses:
NettyEventLoop, NioEventLoop

public abstract class EventLoopBase extends Object implements EventLoop
Common methods for Netty and NIO event loop.
  • Constructor Details

    • EventLoopBase

      public EventLoopBase(EventPolicy policy, int index)
      Common event loop constructor.
  • Method Details

    • getProcessSize

      public 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.
      Specified by:
      getProcessSize in interface EventLoop
    • getQueueSize

      public 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.
      Specified by:
      getQueueSize in interface EventLoop
    • getIndex

      public int getIndex()
      Return event loop array index.
      Specified by:
      getIndex in interface EventLoop
    • createState

      public com.aerospike.client.async.EventState createState()
      For internal use only.
      Specified by:
      createState in interface EventLoop