Class NioEventLoop

All Implemented Interfaces:
EventLoop, EventLoopGroup, IoEventLoop, IoEventLoopGroup, EventExecutor, EventExecutorGroup, OrderedEventExecutor, ThreadAwareExecutor, Iterable<EventExecutor>, Executor, ExecutorService, 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.
  • Method Details

    • selectorProvider

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

      public void register(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.
    • getIoRatio

      public int getIoRatio()
      Deprecated.
      Always return 0.
    • setIoRatio

      @Deprecated public void setIoRatio(int ioRatio)
      Deprecated.
      This method is a no-op.
    • 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 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.