Class KQueueEventLoop

    • Method Detail

      • remove

        void remove​(AbstractKQueueChannel ch)
             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • wakeup

        private void wakeup()
      • kqueueWait

        private int kqueueWait​(boolean oldWakeup)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • kqueueWaitNow

        private int kqueueWaitNow()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • kqueueWait

        private int kqueueWait​(int timeoutSec,
                               int timeoutNs)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • processReady

        private void processReady​(int ready)
      • 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
      • newTaskQueue0

        private static java.util.Queue<java.lang.Runnable> newTaskQueue0​(int maxPendingTasks)
      • 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.
      • registeredChannelsIterator

        public java.util.Iterator<Channel> registeredChannelsIterator()
        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.
      • closeAll

        private void closeAll()
      • handleLoopException

        private static void handleLoopException​(java.lang.Throwable t)