Class NioEventLoopGroup

All Implemented Interfaces:
EventLoopGroup, IoEventLoopGroup, EventExecutorGroup, java.lang.Iterable<EventExecutor>, java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent.ScheduledExecutorService

@Deprecated public class NioEventLoopGroup extends MultiThreadIoEventLoopGroup implements IoEventLoopGroup
MultiThreadIoEventLoopGroup implementation which is used for NIO Selector based Channels.
  • Constructor Details

    • NioEventLoopGroup

      public NioEventLoopGroup()
      Deprecated.
      Create a new instance using the default number of threads, the default ThreadFactory and the SelectorProvider which is returned by SelectorProvider.provider().
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads)
      Deprecated.
      Create a new instance using the specified number of threads, ThreadFactory and the SelectorProvider which is returned by SelectorProvider.provider().
    • NioEventLoopGroup

      public NioEventLoopGroup(java.util.concurrent.ThreadFactory threadFactory)
      Deprecated.
      Create a new instance using the default number of threads, the given ThreadFactory and the SelectorProvider which is returned by SelectorProvider.provider().
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
      Deprecated.
      Create a new instance using the specified number of threads, the given ThreadFactory and the SelectorProvider which is returned by SelectorProvider.provider().
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)
      Deprecated.
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.nio.channels.spi.SelectorProvider selectorProvider)
      Deprecated.
      Create a new instance using the specified number of threads, the given ThreadFactory and the given SelectorProvider.
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
      Deprecated.
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.nio.channels.spi.SelectorProvider selectorProvider)
      Deprecated.
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
      Deprecated.
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
      Deprecated.
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler)
      Deprecated.
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory)
      Deprecated.
    • NioEventLoopGroup

      public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory, EventLoopTaskQueueFactory tailTaskQueueFactory)
      Deprecated.
      Parameters:
      nThreads - the number of threads that will be used by this instance.
      executor - the Executor to use, or null if default one should be used.
      chooserFactory - the EventExecutorChooserFactory to use.
      selectorProvider - the SelectorProvider to use.
      selectStrategyFactory - the SelectStrategyFactory to use.
      rejectedExecutionHandler - the RejectedExecutionHandler to use.
      taskQueueFactory - the EventLoopTaskQueueFactory to use for SingleThreadEventExecutor.execute(Runnable), or null if default one should be used.
      tailTaskQueueFactory - the EventLoopTaskQueueFactory to use for SingleThreadEventLoop.executeAfterEventLoopIteration(Runnable), or null if default one should be used.
  • Method Details

    • rebuildSelectors

      public void rebuildSelectors()
      Deprecated.
      Replaces the current Selectors of the child event loops with newly created Selectors to work around the infamous epoll 100% CPU bug.
    • newChild

      protected IoEventLoop newChild(java.util.concurrent.Executor executor, IoHandlerFactory ioHandlerFactory, java.lang.Object... args)
      Deprecated.
      Description copied from class: MultiThreadIoEventLoopGroup
      Creates a new IoEventLoop to use with the given Executor and IoHandler.
      Overrides:
      newChild in class MultiThreadIoEventLoopGroup
      Parameters:
      executor - the Executor that should be used to handle execution of tasks and IO.
      ioHandlerFactory - the IoHandlerFactory that should be used to obtain IoHandler to handle IO.
      args - extra arguments that are based by the constructor.
      Returns:
      the created IoEventLoop.