JavaScript is disabled on your browser.
Skip navigation links
  • Detail:
  • Field |
  • Constr |
  • Method
io.netty.channel.nio

Class NioEventLoop

    • Method Detail

      • selectorProvider

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

        protected java.util.Queue<java.lang.Runnable> newTaskQueue(int maxPendingTasks)
        Description copied from class: SingleThreadEventExecutor
        Create a new Queue which will holds the tasks to execute. This default implementation will return a LinkedBlockingQueue but if your sub-class of SingleThreadEventExecutor will not do any blocking calls on the this Queue it may make sense to @Override this and return some more performant implementation that does not support blocking operations at all.
        Overrides:
        newTaskQueue in class SingleThreadEventExecutor
      • pendingTasks

        public int pendingTasks()
        Description copied from class: SingleThreadEventExecutor
        Return the number of tasks that are pending for processing. Be aware that this operation may be expensive as it depends on the internal implementation of the SingleThreadEventExecutor. So use it was care!
        Overrides:
        pendingTasks in class SingleThreadEventExecutor
      • register

        public void register(java.nio.channels.SelectableChannel ch,
         int interestOps,
         NioTask<?> task)
        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()
        Returns the percentage of the desired amount of time spent for I/O in the event loop.
      • setIoRatio

        public void setIoRatio(int ioRatio)
        Sets the percentage of the desired amount of time spent for I/O in the event loop. The default value is 50, which means the event loop will try to spend the same amount of time for I/O as for non-I/O tasks.
      • rebuildSelector

        public void rebuildSelector()
        Replaces the current Selector of this event loop with newly created Selectors to work around the infamous epoll 100% CPU bug.
Skip navigation links
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2008–2018 The Netty Project. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /