Top Constructors Methods
io.netty.channel.kqueue

public final Class KQueueEventLoopGroup

extends MultithreadEventLoopGroup
Class Inheritance
Annotations
@UnstableApi
Imports
io.netty.channel.DefaultSelectStrategyFactory, .EventLoop, .EventLoopTaskQueueFactory, .MultithreadEventLoopGroup, .SelectStrategyFactory, .SingleThreadEventLoop, io.netty.util.concurrent.EventExecutor, .EventExecutorChooserFactory, .RejectedExecutionHandler, .RejectedExecutionHandlers, io.netty.util.internal.UnstableApi, java.util.concurrent.Executor, .ThreadFactory

Constructor Summary

AccessConstructor and Description
public
KQueueEventLoopGroup()

Create a new instance using the default number of threads and the default ThreadFactory.

public
KQueueEventLoopGroup(int nThreads)

Create a new instance using the specified number of threads and the default ThreadFactory.

public
KQueueEventLoopGroup(ThreadFactory threadFactory)

Create a new instance using the default number of threads and the given ThreadFactory.

public
KQueueEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory)

Create a new instance using the specified number of threads and the default ThreadFactory.

public
KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory)

Create a new instance using the specified number of threads and the given ThreadFactory.

public
KQueueEventLoopGroup(int nThreads, Executor executor)

public
KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, SelectStrategyFactory selectStrategyFactory)

Create a new instance using the specified number of threads and the given ThreadFactory.

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(...).
public
KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce, 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(...).
public
KQueueEventLoopGroup(int nThreads, Executor executor, SelectStrategyFactory selectStrategyFactory)

public
KQueueEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory)

public
KQueueEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler)

public
KQueueEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory queueFactory)

public
KQueueEventLoopGroup(int
the number of threads that will be used by this instance.
nThreads
,
Executor
the Executor to use, or null if default one should be used.
executor
,
EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory
the EventLoopTaskQueueFactory to use for SingleThreadEventLoop#execute(Runnable), or null if default one should be used.
taskQueueFactory
,
EventLoopTaskQueueFactory tailTaskQueueFactory)

Method Summary

Modifier and TypeMethod and Description
protected EventLoop
newChild(Executor executor, Object... args)

Implements abstract io.netty.channel.MultithreadEventLoopGroup.newChild.

Create a new EventExecutor which will later then accessible via the next() method.
public void
setIoRatio(int ioRatio)

Sets the percentage of the desired amount of time spent for I/O in the child event loops.

Inherited from io.netty.channel.MultithreadEventLoopGroup:
newDefaultThreadFactorynextregisterregisterregister

Constructor Detail

KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup()

Create a new instance using the default number of threads and the default ThreadFactory.

KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads)

Create a new instance using the specified number of threads and the default ThreadFactory.

KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(ThreadFactory threadFactory)

Create a new instance using the default number of threads and the given ThreadFactory.

Annotations
@SuppressWarnings:deprecation
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory)

Create a new instance using the specified number of threads and the default ThreadFactory.

Annotations
@SuppressWarnings:deprecation
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory)

Create a new instance using the specified number of threads and the given ThreadFactory.

Annotations
@SuppressWarnings:deprecation
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, Executor executor)
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, SelectStrategyFactory selectStrategyFactory)

Create a new instance using the specified number of threads and the given ThreadFactory.

Annotations
@SuppressWarnings:deprecation
KQueueEventLoopGroupback to summary
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(...).

Annotations
@Deprecated
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, ThreadFactory threadFactory, int maxEventsAtOnce, 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(...).

Annotations
@Deprecated
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, Executor executor, SelectStrategyFactory selectStrategyFactory)
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory)
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler)
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory queueFactory)
KQueueEventLoopGroupback to summary
public KQueueEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory, EventLoopTaskQueueFactory tailTaskQueueFactory)
Parameters
nThreads:int

the number of threads that will be used by this instance.

executor:Executor

the Executor to use, or null if default one should be used.

chooserFactory:EventExecutorChooserFactory

the EventExecutorChooserFactory to use.

selectStrategyFactory:SelectStrategyFactory

the SelectStrategyFactory to use.

rejectedExecutionHandler:RejectedExecutionHandler

the RejectedExecutionHandler to use.

taskQueueFactory:EventLoopTaskQueueFactory

the EventLoopTaskQueueFactory to use for SingleThreadEventLoop#execute(Runnable), or null if default one should be used.

tailTaskQueueFactory:EventLoopTaskQueueFactory

the EventLoopTaskQueueFactory to use for SingleThreadEventLoop#executeAfterEventLoopIteration(Runnable), or null if default one should be used.

Method Detail

newChildback to summary
protected EventLoop newChild(Executor executor, Object... args) throws Exception

Implements abstract io.netty.channel.MultithreadEventLoopGroup.newChild.

Doc from io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild.

Create a new EventExecutor which will later then accessible via the next() method. This method will be called for each thread that will serve this MultithreadEventExecutorGroup.

Annotations
@Override
setIoRatioback to summary
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.