Package io.netty.channel
Class ThreadPerChannelEventLoopGroup
java.lang.Object
io.netty.util.concurrent.AbstractEventExecutorGroup
io.netty.channel.ThreadPerChannelEventLoopGroup
- All Implemented Interfaces:
EventLoopGroup
,EventExecutorGroup
,AutoCloseable
,Iterable<EventExecutor>
,Executor
,ExecutorService
,ScheduledExecutorService
- Direct Known Subclasses:
OioEventLoopGroup
@Deprecated
public class ThreadPerChannelEventLoopGroup
extends AbstractEventExecutorGroup
implements EventLoopGroup
Deprecated.
this will be remove in the next-major release.
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.private final Object[]
Deprecated.private final FutureListener
<Object> Deprecated.(package private) final Executor
Deprecated.Deprecated.private final int
Deprecated.private boolean
Deprecated.private final Promise
<?> Deprecated.private final ChannelException
Deprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Deprecated.Create a newThreadPerChannelEventLoopGroup
with no limit in place.protected
ThreadPerChannelEventLoopGroup
(int maxChannels) Deprecated.Create a newThreadPerChannelEventLoopGroup
.protected
ThreadPerChannelEventLoopGroup
(int maxChannels, Executor executor, Object... args) Deprecated.Create a newThreadPerChannelEventLoopGroup
.protected
ThreadPerChannelEventLoopGroup
(int maxChannels, ThreadFactory threadFactory, Object... args) Deprecated.Create a newThreadPerChannelEventLoopGroup
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
awaitTermination
(long timeout, TimeUnit unit) Deprecated.boolean
Deprecated.boolean
Deprecated.Returnstrue
if and only if allEventExecutor
s managed by thisEventExecutorGroup
are being shut down gracefully or was shut down.boolean
Deprecated.iterator()
Deprecated.protected EventLoop
Deprecated.Creates a newEventLoop
.next()
Deprecated.Return the nextEventLoop
to useprivate EventLoop
Deprecated.register
(ChannelPromise promise) Deprecated.register
(Channel channel, 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
<?> Deprecated.Returns theFuture
which is notified when allEventExecutor
s managed by thisEventExecutorGroup
have been terminated.Methods inherited from class io.netty.util.concurrent.AbstractEventExecutorGroup
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.util.concurrent.EventExecutorGroup
schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
Methods inherited from interface java.util.concurrent.ExecutorService
close, invokeAll, invokeAll, invokeAny, invokeAny
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
childArgs
Deprecated. -
maxChannels
private final int maxChannelsDeprecated. -
executor
Deprecated. -
activeChildren
Deprecated. -
idleChildren
Deprecated. -
tooManyChannels
Deprecated. -
shuttingDown
private volatile boolean shuttingDownDeprecated. -
terminationFuture
Deprecated. -
childTerminationListener
Deprecated.
-
-
Constructor Details
-
ThreadPerChannelEventLoopGroup
protected ThreadPerChannelEventLoopGroup()Deprecated.Create a newThreadPerChannelEventLoopGroup
with no limit in place. -
ThreadPerChannelEventLoopGroup
protected ThreadPerChannelEventLoopGroup(int maxChannels) Deprecated.Create a newThreadPerChannelEventLoopGroup
.- Parameters:
maxChannels
- the maximum number of channels to handle with this instance. Once you try to register a newChannel
and the maximum is exceed it will throw anChannelException
. on theregister(Channel)
andregister(ChannelPromise)
method. Use0
to use no limit
-
ThreadPerChannelEventLoopGroup
protected ThreadPerChannelEventLoopGroup(int maxChannels, ThreadFactory threadFactory, Object... args) Deprecated.Create a newThreadPerChannelEventLoopGroup
.- Parameters:
maxChannels
- the maximum number of channels to handle with this instance. Once you try to register a newChannel
and the maximum is exceed it will throw anChannelException
on theregister(Channel)
andregister(ChannelPromise)
method. Use0
to use no limitthreadFactory
- theThreadFactory
used to create newThread
instances that handle the registeredChannel
sargs
- arguments which will passed to eachnewChild(Object...)
call.
-
ThreadPerChannelEventLoopGroup
Deprecated.Create a newThreadPerChannelEventLoopGroup
.- Parameters:
maxChannels
- the maximum number of channels to handle with this instance. Once you try to register a newChannel
and the maximum is exceed it will throw anChannelException
on theregister(Channel)
andregister(ChannelPromise)
method. Use0
to use no limitexecutor
- theExecutor
used to create newThread
instances that handle the registeredChannel
sargs
- arguments which will passed to eachnewChild(Object...)
call.
-
-
Method Details
-
newChild
Deprecated.Creates a newEventLoop
. The default implementation creates a newThreadPerChannelEventLoop
.- Throws:
Exception
-
iterator
Deprecated.- Specified by:
iterator
in interfaceEventExecutorGroup
- Specified by:
iterator
in interfaceIterable<EventExecutor>
-
next
Deprecated.Description copied from interface:EventLoopGroup
Return the nextEventLoop
to use- Specified by:
next
in interfaceEventExecutorGroup
- Specified by:
next
in interfaceEventLoopGroup
-
shutdownGracefully
Deprecated.Description copied from interface:EventExecutorGroup
Signals this executor that the caller wants the executor to be shut down. Once this method is called,EventExecutorGroup.isShuttingDown()
starts to returntrue
, and the executor prepares to shut itself down. UnlikeEventExecutorGroup.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.- Specified by:
shutdownGracefully
in interfaceEventExecutorGroup
- Parameters:
quietPeriod
- 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 ofquietPeriod
andtimeout
- Returns:
- the
EventExecutorGroup.terminationFuture()
-
terminationFuture
Deprecated.Description copied from interface:EventExecutorGroup
Returns theFuture
which is notified when allEventExecutor
s managed by thisEventExecutorGroup
have been terminated.- Specified by:
terminationFuture
in interfaceEventExecutorGroup
-
shutdown
Deprecated.- Specified by:
shutdown
in interfaceEventExecutorGroup
- Specified by:
shutdown
in interfaceExecutorService
- Specified by:
shutdown
in classAbstractEventExecutorGroup
-
isShuttingDown
public boolean isShuttingDown()Deprecated.Description copied from interface:EventExecutorGroup
Returnstrue
if and only if allEventExecutor
s managed by thisEventExecutorGroup
are being shut down gracefully or was shut down.- Specified by:
isShuttingDown
in interfaceEventExecutorGroup
-
isShutdown
public boolean isShutdown()Deprecated.- Specified by:
isShutdown
in interfaceExecutorService
-
isTerminated
public boolean isTerminated()Deprecated.- Specified by:
isTerminated
in interfaceExecutorService
-
awaitTermination
Deprecated.- Specified by:
awaitTermination
in interfaceExecutorService
- Throws:
InterruptedException
-
register
Deprecated.Description copied from interface:EventLoopGroup
Register aChannel
with thisEventLoop
. The returnedChannelFuture
will get notified once the registration was complete.- Specified by:
register
in interfaceEventLoopGroup
-
register
Deprecated.Description copied from interface:EventLoopGroup
Register aChannel
with thisEventLoop
using aChannelFuture
. The passedChannelFuture
will get notified once the registration was complete and also will get returned.- Specified by:
register
in interfaceEventLoopGroup
-
register
Deprecated.Description copied from interface:EventLoopGroup
Register aChannel
with thisEventLoop
. The passedChannelFuture
will get notified once the registration was complete and also will get returned.- Specified by:
register
in interfaceEventLoopGroup
-
nextChild
Deprecated.- Throws:
Exception
-