Top Description Constructors Methods
io.netty.channel.epoll

public final Class EpollEventLoopGroup

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

EventLoopGroup which uses epoll under the covers. Because of this it only works on linux.

Constructor Summary

AccessConstructor and Description
public
EpollEventLoopGroup()

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

public
EpollEventLoopGroup(int nThreads)

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

public
EpollEventLoopGroup(ThreadFactory threadFactory)

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

public
EpollEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory)

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

public
EpollEventLoopGroup(int nThreads, ThreadFactory threadFactory)

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

public
EpollEventLoopGroup(int nThreads, Executor executor)

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

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

public
EpollEventLoopGroup(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
EpollEventLoopGroup(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
EpollEventLoopGroup(int nThreads, Executor executor, SelectStrategyFactory selectStrategyFactory)

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

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

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

public
EpollEventLoopGroup(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

EpollEventLoopGroupback to summary
public EpollEventLoopGroup()

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

EpollEventLoopGroupback to summary
public EpollEventLoopGroup(int nThreads)

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

EpollEventLoopGroupback to summary
public EpollEventLoopGroup(ThreadFactory threadFactory)

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

Annotations
@SuppressWarnings:deprecation
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory)

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

Annotations
@SuppressWarnings:deprecation
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(int nThreads, ThreadFactory threadFactory)

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

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

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

Annotations
@SuppressWarnings:deprecation
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(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
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(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
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(int nThreads, Executor executor, SelectStrategyFactory selectStrategyFactory)
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory)
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler)
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory queueFactory)
EpollEventLoopGroupback to summary
public EpollEventLoopGroup(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.