Class KQueueEventLoopGroup

java.lang.Object
io.netty.util.concurrent.AbstractEventExecutorGroup
io.netty.util.concurrent.MultithreadEventExecutorGroup
io.netty.channel.MultithreadEventLoopGroup
io.netty.channel.kqueue.KQueueEventLoopGroup
All Implemented Interfaces:
io.netty.channel.EventLoopGroup, io.netty.util.concurrent.EventExecutorGroup, AutoCloseable, Iterable<io.netty.util.concurrent.EventExecutor>, Executor, ExecutorService, ScheduledExecutorService

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

    • 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(ThreadFactory threadFactory)
      Create a new instance using the default number of threads and the given 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, ThreadFactory threadFactory)
      Create a new instance using the specified number of threads and the given ThreadFactory.
    • KQueueEventLoopGroup

      public KQueueEventLoopGroup(int nThreads, Executor executor)
    • KQueueEventLoopGroup

      public KQueueEventLoopGroup(int nThreads, 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, 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

      @Deprecated public KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce, io.netty.channel.SelectStrategyFactory selectStrategyFactory)
      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, Executor executor, io.netty.channel.SelectStrategyFactory selectStrategyFactory)
    • KQueueEventLoopGroup

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

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

      public KQueueEventLoopGroup(int nThreads, 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

      public KQueueEventLoopGroup(int nThreads, Executor executor, io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory, io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler, io.netty.channel.EventLoopTaskQueueFactory taskQueueFactory, io.netty.channel.EventLoopTaskQueueFactory tailTaskQueueFactory)
      Parameters:
      nThreads - the number of threads that will be used by this instance.
      executor - the Executor to use, or null if default one should be used.
      chooserFactory - the EventExecutorChooserFactory to use.
      selectStrategyFactory - the SelectStrategyFactory to use.
      rejectedExecutionHandler - the RejectedExecutionHandler to use.
      taskQueueFactory - the EventLoopTaskQueueFactory to use for SingleThreadEventExecutor.execute(Runnable), or null if default one should be used.
      tailTaskQueueFactory - the EventLoopTaskQueueFactory to use for SingleThreadEventLoop.executeAfterEventLoopIteration(Runnable), or null if default one should be used.
  • Method Details

    • 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(Executor executor, Object... args) throws Exception
      Specified by:
      newChild in class io.netty.channel.MultithreadEventLoopGroup
      Throws:
      Exception