public abstract class MultithreadEventLoopGroup extends MultithreadEventExecutorGroup implements EventLoopGroup
EventLoopGroup
implementations that handle their tasks with multiple threads at
the same time.Modifier | Constructor and Description |
---|---|
protected |
MultithreadEventLoopGroup(int nEventLoops,
Executor executor,
Object... args) |
protected |
MultithreadEventLoopGroup(int nEventLoops,
ExecutorServiceFactory executorServiceFactory,
Object... args) |
Modifier and Type | Method and Description |
---|---|
protected abstract EventLoop |
newChild(Executor executor,
Object... args)
Create a new EventExecutor which will later then accessible via the
MultithreadEventExecutorGroup.next() method. |
EventLoop |
next()
Returns one of the
EventExecutor s managed by this EventExecutorGroup . |
ChannelFuture |
register(Channel channel)
|
ChannelFuture |
register(Channel channel,
ChannelPromise promise)
|
awaitTermination, children, executorCount, isShutdown, isShuttingDown, isTerminated, newDefaultExecutorService, shutdown, shutdownGracefully, terminationFuture
close, 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
children, isShuttingDown, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
close
protected MultithreadEventLoopGroup(int nEventLoops, Executor executor, Object... args)
MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, Executor, Object...)}
protected MultithreadEventLoopGroup(int nEventLoops, ExecutorServiceFactory executorServiceFactory, Object... args)
MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, ExecutorServiceFactory, Object...)}
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(Executor executor, Object... args) throws Exception
MultithreadEventExecutorGroup
MultithreadEventExecutorGroup.next()
method. This method will be
called for each thread that will serve this MultithreadEventExecutorGroup
.newChild
in class MultithreadEventExecutorGroup
Exception
public ChannelFuture register(Channel channel)
EventLoopGroup
Channel
with an EventLoop
from this EventLoopGroup
. The returned
ChannelFuture
will get notified once the registration is completed.
It's only safe to submit a new task to the EventLoop
from within a
ChannelHandler
once the ChannelPromise
succeeded. Otherwise
the task may or may not be rejected.
register
in interface EventLoopGroup
public ChannelFuture register(Channel channel, ChannelPromise promise)
EventLoopGroup
Channel
with an EventLoop
from this EventLoopGroup
. The provided
ChannelPromise
will get notified once the registration is completed. The returned ChannelFuture
is the same ChannelPromise
that was passed to the method.
It's only safe to submit a new task to the EventLoop
from within a
ChannelHandler
once the ChannelPromise
succeeded. Otherwise
the task may or may not be rejected.
register
in interface EventLoopGroup
Copyright © 2008–2015 The Netty Project. All rights reserved.