Class KQueueEventLoopGroup

  • All Implemented Interfaces:
    io.netty.channel.EventLoopGroup, io.netty.util.concurrent.EventExecutorGroup, java.lang.Iterable<io.netty.util.concurrent.EventExecutor>, java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent.ScheduledExecutorService

    @UnstableApi
    public final class KQueueEventLoopGroup
    extends io.netty.channel.MultithreadEventLoopGroup
    • Constructor Summary

      Constructors 
      Constructor Description
      KQueueEventLoopGroup()
      Create a new instance using the default number of threads and the default ThreadFactory.
      KQueueEventLoopGroup​(int nThreads)
      Create a new instance using the specified number of threads and the default ThreadFactory.
      KQueueEventLoopGroup​(int nThreads, io.netty.channel.SelectStrategyFactory selectStrategyFactory)
      Create a new instance using the specified number of threads and the default ThreadFactory.
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.Executor executor)  
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.Executor executor, io.netty.channel.SelectStrategyFactory selectStrategyFactory)  
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.Executor executor, io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory)  
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.Executor executor, io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory, io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)  
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.Executor executor, io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory, io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler, io.netty.channel.EventLoopTaskQueueFactory queueFactory)  
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
      Create a new instance using the specified number of threads and the given ThreadFactory.
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce)
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce, io.netty.channel.SelectStrategyFactory selectStrategyFactory)
      KQueueEventLoopGroup​(int nThreads, java.util.concurrent.ThreadFactory threadFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory)
      Create a new instance using the specified number of threads and the given ThreadFactory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected io.netty.channel.EventLoop newChild​(java.util.concurrent.Executor executor, java.lang.Object... args)  
      void setIoRatio​(int ioRatio)
      Sets the percentage of the desired amount of time spent for I/O in the child event loops.
      • Methods inherited from class io.netty.channel.MultithreadEventLoopGroup

        newDefaultThreadFactory, next, register, register, register
      • Methods inherited from class io.netty.util.concurrent.MultithreadEventExecutorGroup

        awaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, shutdown, shutdownGracefully, terminationFuture
      • Methods inherited from class io.netty.util.concurrent.AbstractEventExecutorGroup

        execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.util.concurrent.EventExecutorGroup

        isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
      • Methods inherited from interface java.util.concurrent.Executor

        execute
      • Methods inherited from interface java.util.concurrent.ExecutorService

        awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • KQueueEventLoopGroup

        public KQueueEventLoopGroup()
        Create a new instance using the default number of threads and the default ThreadFactory.
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads)
        Create a new instance using the specified number of threads and the default ThreadFactory.
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads,
                                    io.netty.channel.SelectStrategyFactory selectStrategyFactory)
        Create a new instance using the specified number of threads and the default ThreadFactory.
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads,
                                    java.util.concurrent.ThreadFactory threadFactory)
        Create a new instance using the specified number of threads and the given ThreadFactory.
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads,
                                    java.util.concurrent.Executor executor)
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads,
                                    java.util.concurrent.ThreadFactory threadFactory,
                                    io.netty.channel.SelectStrategyFactory selectStrategyFactory)
        Create a new instance using the specified number of threads and the given ThreadFactory.
      • KQueueEventLoopGroup

        @Deprecated
        public KQueueEventLoopGroup​(int nThreads,
                                    java.util.concurrent.ThreadFactory threadFactory,
                                    int maxEventsAtOnce)
        Create a new instance using the specified number of threads, the given ThreadFactory and the given maximal amount of epoll events to handle per epollWait(...).
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads,
                                    java.util.concurrent.Executor executor,
                                    io.netty.channel.SelectStrategyFactory selectStrategyFactory)
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads,
                                    java.util.concurrent.Executor executor,
                                    io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory,
                                    io.netty.channel.SelectStrategyFactory selectStrategyFactory)
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads,
                                    java.util.concurrent.Executor executor,
                                    io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory,
                                    io.netty.channel.SelectStrategyFactory selectStrategyFactory,
                                    io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
      • KQueueEventLoopGroup

        public KQueueEventLoopGroup​(int nThreads,
                                    java.util.concurrent.Executor executor,
                                    io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory,
                                    io.netty.channel.SelectStrategyFactory selectStrategyFactory,
                                    io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler,
                                    io.netty.channel.EventLoopTaskQueueFactory queueFactory)
    • Method Detail

      • setIoRatio

        public void setIoRatio​(int ioRatio)
        Sets the percentage of the desired amount of time spent for I/O in the child event loops. 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.
      • newChild

        protected io.netty.channel.EventLoop newChild​(java.util.concurrent.Executor executor,
                                                      java.lang.Object... args)
                                               throws java.lang.Exception
        Specified by:
        newChild in class io.netty.channel.MultithreadEventLoopGroup
        Throws:
        java.lang.Exception