public abstract class MultithreadEventLoopGroup extends MultithreadEventExecutorGroup implements EventLoopGroup
EventLoopGroup
implementations that handles their tasks with multiple threads at
the same time.Modifier and Type | Field and Description |
---|---|
private static int |
DEFAULT_EVENT_LOOP_THREADS |
private static InternalLogger |
logger |
Modifier | Constructor and Description |
---|---|
protected |
MultithreadEventLoopGroup(int nThreads,
java.util.concurrent.Executor executor,
EventExecutorChooserFactory chooserFactory,
java.lang.Object... args) |
protected |
MultithreadEventLoopGroup(int nThreads,
java.util.concurrent.Executor executor,
java.lang.Object... args) |
protected |
MultithreadEventLoopGroup(int nThreads,
java.util.concurrent.ThreadFactory threadFactory,
java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
protected abstract EventLoop |
newChild(java.util.concurrent.Executor executor,
java.lang.Object... args)
Create a new EventExecutor which will later then accessible via the
MultithreadEventExecutorGroup.next() method. |
protected java.util.concurrent.ThreadFactory |
newDefaultThreadFactory() |
EventLoop |
next()
Returns one of the
EventExecutor s managed by this EventExecutorGroup . |
ChannelFuture |
register(Channel channel)
|
ChannelFuture |
register(Channel channel,
ChannelPromise promise)
Deprecated.
|
ChannelFuture |
register(ChannelPromise promise)
|
awaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, shutdown, shutdownGracefully, terminationFuture
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
private static final InternalLogger logger
private static final int DEFAULT_EVENT_LOOP_THREADS
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.lang.Object... args)
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.lang.Object... args)
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.lang.Object... args)
protected java.util.concurrent.ThreadFactory newDefaultThreadFactory()
newDefaultThreadFactory
in class MultithreadEventExecutorGroup
public EventLoop next()
EventExecutorGroup
EventExecutor
s managed by this EventExecutorGroup
.next
in interface EventLoopGroup
next
in interface EventExecutorGroup
next
in class MultithreadEventExecutorGroup
protected abstract EventLoop newChild(java.util.concurrent.Executor executor, java.lang.Object... args) throws java.lang.Exception
MultithreadEventExecutorGroup
MultithreadEventExecutorGroup.next()
method. This method will be
called for each thread that will serve this MultithreadEventExecutorGroup
.newChild
in class MultithreadEventExecutorGroup
java.lang.Exception
public ChannelFuture register(Channel channel)
EventLoopGroup
Channel
with this EventLoop
. The returned ChannelFuture
will get notified once the registration was complete.register
in interface EventLoopGroup
public ChannelFuture register(ChannelPromise promise)
EventLoopGroup
Channel
with this EventLoop
using a ChannelFuture
. The passed
ChannelFuture
will get notified once the registration was complete and also will get returned.register
in interface EventLoopGroup
@Deprecated public ChannelFuture register(Channel channel, ChannelPromise promise)
EventLoopGroup
Channel
with this EventLoop
. The passed ChannelFuture
will get notified once the registration was complete and also will get returned.register
in interface EventLoopGroup