Class NioEventLoop

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

@Deprecated public final class NioEventLoop extends SingleThreadIoEventLoop
SingleThreadIoEventLoop implementation which register the Channel's to a Selector and so does the multi-plexing of these in the event loop.
  • Field Details

  • Constructor Details

  • Method Details

    • newTaskQueue

      private static java.util.Queue<java.lang.Runnable> newTaskQueue(EventLoopTaskQueueFactory queueFactory)
      Deprecated.
    • selectorProvider

      public java.nio.channels.spi.SelectorProvider selectorProvider()
      Deprecated.
      Returns the SelectorProvider used by this NioEventLoop to obtain the Selector.
    • register

      public void register(java.nio.channels.SelectableChannel ch, int interestOps, NioTask<?> task)
      Deprecated.
      Registers an arbitrary SelectableChannel, not necessarily created by Netty, to the Selector of this event loop. Once the specified SelectableChannel is registered, the specified task will be executed by this event loop when the SelectableChannel is ready.
    • register0

      private void register0(java.nio.channels.SelectableChannel ch, int interestOps, NioTask<java.nio.channels.SelectableChannel> task)
      Deprecated.
    • rebuildSelector

      public void rebuildSelector()
      Deprecated.
      Replaces the current Selector of this event loop with newly created Selectors to work around the infamous epoll 100% CPU bug.
    • registeredChannels

      public int registeredChannels()
      Deprecated.
      Description copied from class: SingleThreadEventLoop
      Returns the number of Channels registered with this EventLoop or -1 if operation is not supported. The returned value is not guaranteed to be exact accurate and should be viewed as a best effort.
      Overrides:
      registeredChannels in class SingleThreadEventLoop
    • registeredChannelsIterator

      public java.util.Iterator<Channel> registeredChannelsIterator()
      Deprecated.
      Overrides:
      registeredChannelsIterator in class SingleThreadEventLoop
      Returns:
      read-only iterator of active Channels registered with this EventLoop. The returned value is not guaranteed to be exact accurate and should be viewed as a best effort. This method is expected to be called from within event loop.
    • unwrappedSelector

      java.nio.channels.Selector unwrappedSelector()
      Deprecated.