Package io.netty.channel.kqueue
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 Summary
ConstructorsConstructorDescriptionCreate a new instance using the default number of threads and the defaultThreadFactory.KQueueEventLoopGroup(int nThreads) Create a new instance using the specified number of threads and the defaultThreadFactory.KQueueEventLoopGroup(int nThreads, io.netty.channel.SelectStrategyFactory selectStrategyFactory) Create a new instance using the specified number of threads and the defaultThreadFactory.KQueueEventLoopGroup(int nThreads, Executor executor) KQueueEventLoopGroup(int nThreads, Executor executor, io.netty.channel.SelectStrategyFactory selectStrategyFactory) KQueueEventLoopGroup(int nThreads, Executor executor, io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory) KQueueEventLoopGroup(int nThreads, Executor executor, io.netty.util.concurrent.EventExecutorChooserFactory chooserFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory, io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler) 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(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) KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory) Create a new instance using the specified number of threads and the givenThreadFactory.KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce) Deprecated.KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce, io.netty.channel.SelectStrategyFactory selectStrategyFactory) KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory) Create a new instance using the specified number of threads and the givenThreadFactory.KQueueEventLoopGroup(ThreadFactory threadFactory) Create a new instance using the default number of threads and the givenThreadFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected io.netty.channel.EventLoopvoidsetIoRatio(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, registerMethods inherited from class io.netty.util.concurrent.MultithreadEventExecutorGroup
awaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, shutdown, shutdownGracefully, terminationFutureMethods inherited from class io.netty.util.concurrent.AbstractEventExecutorGroup
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.util.concurrent.EventExecutorGroup
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFutureMethods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, close, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
KQueueEventLoopGroup
public KQueueEventLoopGroup()Create a new instance using the default number of threads and the defaultThreadFactory. -
KQueueEventLoopGroup
public KQueueEventLoopGroup(int nThreads) Create a new instance using the specified number of threads and the defaultThreadFactory. -
KQueueEventLoopGroup
Create a new instance using the default number of threads and the givenThreadFactory. -
KQueueEventLoopGroup
public KQueueEventLoopGroup(int nThreads, io.netty.channel.SelectStrategyFactory selectStrategyFactory) Create a new instance using the specified number of threads and the defaultThreadFactory. -
KQueueEventLoopGroup
Create a new instance using the specified number of threads and the givenThreadFactory. -
KQueueEventLoopGroup
-
KQueueEventLoopGroup
public KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, io.netty.channel.SelectStrategyFactory selectStrategyFactory) Create a new instance using the specified number of threads and the givenThreadFactory. -
KQueueEventLoopGroup
@Deprecated public KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce) Deprecated.Create a new instance using the specified number of threads, the givenThreadFactoryand 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) Deprecated.Create a new instance using the specified number of threads, the givenThreadFactoryand 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, ornullif default one should be used.chooserFactory- theEventExecutorChooserFactoryto use.selectStrategyFactory- theSelectStrategyFactoryto use.rejectedExecutionHandler- theRejectedExecutionHandlerto use.taskQueueFactory- theEventLoopTaskQueueFactoryto use forSingleThreadEventExecutor.execute(Runnable), ornullif default one should be used.tailTaskQueueFactory- theEventLoopTaskQueueFactoryto use forSingleThreadEventLoop.executeAfterEventLoopIteration(Runnable), ornullif 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 is50, which means the event loop will try to spend the same amount of time for I/O as for non-I/O tasks. -
newChild
- Specified by:
newChildin classio.netty.channel.MultithreadEventLoopGroup- Throws:
Exception
-
KQueueEventLoopGroup(int)orKQueueEventLoopGroup(int, ThreadFactory)