@Deprecated public class ThreadPerChannelEventLoopGroup extends AbstractEventExecutorGroup implements EventLoopGroup
| Modifier | Constructor and Description |
|---|---|
protected |
ThreadPerChannelEventLoopGroup()
Deprecated.
Create a new
ThreadPerChannelEventLoopGroup with no limit in place. |
protected |
ThreadPerChannelEventLoopGroup(int maxChannels)
Deprecated.
Create a new
ThreadPerChannelEventLoopGroup. |
protected |
ThreadPerChannelEventLoopGroup(int maxChannels,
Executor executor,
Object... args)
Deprecated.
Create a new
ThreadPerChannelEventLoopGroup. |
protected |
ThreadPerChannelEventLoopGroup(int maxChannels,
ThreadFactory threadFactory,
Object... args)
Deprecated.
Create a new
ThreadPerChannelEventLoopGroup. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
Deprecated.
|
boolean |
isShutdown()
Deprecated.
|
boolean |
isShuttingDown()
Deprecated.
Returns
true if and only if all EventExecutors managed by this EventExecutorGroup
are being shut down gracefully or was shut down. |
boolean |
isTerminated()
Deprecated.
|
Iterator<EventExecutor> |
iterator()
Deprecated.
|
protected EventLoop |
newChild(Object... args)
Deprecated.
Creates a new
EventLoop. |
EventLoop |
next()
Deprecated.
Return the next
EventLoop to use |
ChannelFuture |
register(Channel channel)
Deprecated.
|
ChannelFuture |
register(Channel channel,
ChannelPromise promise)
Deprecated.
|
ChannelFuture |
register(ChannelPromise promise)
Deprecated.
|
void |
shutdown()
Deprecated.
|
Future<?> |
shutdownGracefully(long quietPeriod,
long timeout,
TimeUnit unit)
Deprecated.
Signals this executor that the caller wants the executor to be shut down.
|
Future<?> |
terminationFuture()
Deprecated.
Returns the
Future which is notified when all EventExecutors managed by this
EventExecutorGroup have been terminated. |
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitschedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submitinvokeAll, invokeAll, invokeAny, invokeAnyforEach, spliteratorprotected ThreadPerChannelEventLoopGroup()
ThreadPerChannelEventLoopGroup with no limit in place.protected ThreadPerChannelEventLoopGroup(int maxChannels)
ThreadPerChannelEventLoopGroup.maxChannels - the maximum number of channels to handle with this instance. Once you try to register
a new Channel and the maximum is exceed it will throw an
ChannelException. on the register(Channel) and
register(ChannelPromise) method.
Use 0 to use no limitprotected ThreadPerChannelEventLoopGroup(int maxChannels,
ThreadFactory threadFactory,
Object... args)
ThreadPerChannelEventLoopGroup.maxChannels - the maximum number of channels to handle with this instance. Once you try to register
a new Channel and the maximum is exceed it will throw an
ChannelException on the register(Channel) and
register(ChannelPromise) method.
Use 0 to use no limitthreadFactory - the ThreadFactory used to create new Thread instances that handle the
registered Channelsargs - arguments which will passed to each newChild(Object...) call.protected ThreadPerChannelEventLoopGroup(int maxChannels,
Executor executor,
Object... args)
ThreadPerChannelEventLoopGroup.maxChannels - the maximum number of channels to handle with this instance. Once you try to register
a new Channel and the maximum is exceed it will throw an
ChannelException on the register(Channel) and
register(ChannelPromise) method.
Use 0 to use no limitexecutor - the Executor used to create new Thread instances that handle the
registered Channelsargs - arguments which will passed to each newChild(Object...) call.protected EventLoop newChild(Object... args) throws Exception
EventLoop. The default implementation creates a new ThreadPerChannelEventLoop.Exceptionpublic Iterator<EventExecutor> iterator()
iterator in interface EventExecutorGroupiterator in interface Iterable<EventExecutor>public EventLoop next()
EventLoopGroupEventLoop to usenext in interface EventLoopGroupnext in interface EventExecutorGrouppublic Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit)
EventExecutorGroupEventExecutorGroup.isShuttingDown() starts to return true, and the executor prepares to shut itself down.
Unlike EventExecutorGroup.shutdown(), graceful shutdown ensures that no tasks are submitted for 'the quiet period'
(usually a couple seconds) before it shuts itself down. If a task is submitted during the quiet period,
it is guaranteed to be accepted and the quiet period will start over.shutdownGracefully in interface EventExecutorGroupquietPeriod - the quiet period as described in the documentationtimeout - the maximum amount of time to wait until the executor is EventExecutorGroup.shutdown()
regardless if a task was submitted during the quiet periodunit - the unit of quietPeriod and timeoutEventExecutorGroup.terminationFuture()public Future<?> terminationFuture()
EventExecutorGroupFuture which is notified when all EventExecutors managed by this
EventExecutorGroup have been terminated.terminationFuture in interface EventExecutorGroup@Deprecated public void shutdown()
shutdown in interface EventExecutorGroupshutdown in interface ExecutorServiceshutdown in class AbstractEventExecutorGrouppublic boolean isShuttingDown()
EventExecutorGrouptrue if and only if all EventExecutors managed by this EventExecutorGroup
are being shut down gracefully or was shut down.isShuttingDown in interface EventExecutorGrouppublic boolean isShutdown()
isShutdown in interface ExecutorServicepublic boolean isTerminated()
isTerminated in interface ExecutorServicepublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedExceptionpublic ChannelFuture register(Channel channel)
EventLoopGroupChannel with this EventLoop. The returned ChannelFuture
will get notified once the registration was complete.register in interface EventLoopGrouppublic ChannelFuture register(ChannelPromise promise)
EventLoopGroupChannel 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)
EventLoopGroupChannel with this EventLoop. The passed ChannelFuture
will get notified once the registration was complete and also will get returned.register in interface EventLoopGroupCopyright © 2008–2025 The Netty Project. All rights reserved.