Class NettyEventLoops

java.lang.Object
com.aerospike.client.async.NettyEventLoops
All Implemented Interfaces:
EventLoops, Closeable, AutoCloseable

public final class NettyEventLoops extends Object implements EventLoops
Aerospike wrapper around netty event loops. Implements the Aerospike EventLoops interface.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyEventLoops(EventPolicy policy, io.netty.channel.EventLoopGroup group)
    Create Aerospike event loop wrappers from given netty event loops.
    NettyEventLoops(EventPolicy policy, io.netty.channel.EventLoopGroup group, com.aerospike.client.async.EventLoopType type)
    Create Aerospike event loop wrappers from given netty event loops and specified event loop type.
    NettyEventLoops(io.netty.channel.EventLoopGroup group)
    Create Aerospike event loop wrappers from given netty event loops.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close event loops.
    get(int index)
    Return Aerospike event loop given array index..
    get(io.netty.util.concurrent.EventExecutor eventExecutor)
    Return corresponding Aerospike event loop given netty event loop.
    Return array of Aerospike event loops.
    int
    Return number of event loops in this group.
    Class<? extends io.netty.channel.socket.SocketChannel>
    Return SocketChannel class to use in NettyChannelBuilder.
    Return next Aerospike event loop in round-robin fashion.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NettyEventLoops

      public NettyEventLoops(io.netty.channel.EventLoopGroup group)
      Create Aerospike event loop wrappers from given netty event loops.
    • NettyEventLoops

      public NettyEventLoops(EventPolicy policy, io.netty.channel.EventLoopGroup group)
      Create Aerospike event loop wrappers from given netty event loops. The type of event loop is determined from the event loop group instance.
    • NettyEventLoops

      public NettyEventLoops(EventPolicy policy, io.netty.channel.EventLoopGroup group, com.aerospike.client.async.EventLoopType type)
      Create Aerospike event loop wrappers from given netty event loops and specified event loop type.
  • Method Details

    • getSocketChannelClass

      public Class<? extends io.netty.channel.socket.SocketChannel> getSocketChannelClass()
      Return SocketChannel class to use in NettyChannelBuilder.
    • get

      public NettyEventLoop get(io.netty.util.concurrent.EventExecutor eventExecutor)
      Return corresponding Aerospike event loop given netty event loop.
    • getArray

      public NettyEventLoop[] getArray()
      Return array of Aerospike event loops.
      Specified by:
      getArray in interface EventLoops
    • getSize

      public int getSize()
      Return number of event loops in this group.
      Specified by:
      getSize in interface EventLoops
    • get

      public NettyEventLoop get(int index)
      Return Aerospike event loop given array index..
      Specified by:
      get in interface EventLoops
    • next

      public NettyEventLoop next()
      Return next Aerospike event loop in round-robin fashion.
      Specified by:
      next in interface EventLoops
    • close

      public void close()
      Description copied from interface: EventLoops
      Close event loops.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface EventLoops