Class ThreadPerChannelEventLoopGroup
java.lang.Object
io.netty.util.concurrent.AbstractEventExecutorGroup
io.netty.channel.ThreadPerChannelEventLoopGroup
- All Implemented Interfaces:
EventLoopGroup, EventExecutorGroup, 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.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.Create a newThreadPerChannelEventLoopGroupwith no limit in place.protectedThreadPerChannelEventLoopGroup(int maxChannels) Deprecated.Create a newThreadPerChannelEventLoopGroup.protectedThreadPerChannelEventLoopGroup(int maxChannels, Executor executor, Object... args) Deprecated.Create a newThreadPerChannelEventLoopGroup.protectedThreadPerChannelEventLoopGroup(int maxChannels, ThreadFactory threadFactory, Object... args) Deprecated.Create a newThreadPerChannelEventLoopGroup. -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long timeout, TimeUnit unit) Deprecated.booleanDeprecated.booleanDeprecated.Returnstrueif and only if allEventExecutors managed by thisEventExecutorGroupare being shut down gracefully or was shut down.booleanDeprecated.iterator()Deprecated.protected EventLoopDeprecated.Creates a newEventLoop.next()Deprecated.Returns one of theEventExecutors managed by thisEventExecutorGroup.register(ChannelPromise promise) Deprecated.register(Channel channel, ChannelPromise promise) Deprecated.voidshutdown()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 theFuturewhich is notified when allEventExecutors managed by thisEventExecutorGrouphave been terminated.Methods inherited from class AbstractEventExecutorGroup
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submitMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EventExecutorGroup
schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit, tickerMethods inherited from interface ExecutorService
invokeAll, invokeAll, invokeAny, invokeAnyMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
ThreadPerChannelEventLoopGroup
protected ThreadPerChannelEventLoopGroup()Deprecated.Create a newThreadPerChannelEventLoopGroupwith 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 newChanneland the maximum is exceed it will throw anChannelException. on theregister(Channel)andregister(ChannelPromise)method. Use0to 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 newChanneland the maximum is exceed it will throw anChannelExceptionon theregister(Channel)andregister(ChannelPromise)method. Use0to use no limitthreadFactory- theThreadFactoryused to create newThreadinstances that handle the registeredChannelsargs- 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 newChanneland the maximum is exceed it will throw anChannelExceptionon theregister(Channel)andregister(ChannelPromise)method. Use0to use no limitexecutor- theExecutorused to create newThreadinstances that handle the registeredChannelsargs- arguments which will passed to eachnewChild(Object...)call.
-
-
Method Details
-
newChild
-
iterator
Deprecated.- Specified by:
iteratorin interfaceEventExecutorGroup- Specified by:
iteratorin interfaceIterable<EventExecutor>
-
next
Deprecated.Description copied from interface:EventExecutorGroupReturns one of theEventExecutors managed by thisEventExecutorGroup.- Specified by:
nextin interfaceEventExecutorGroup- Specified by:
nextin interfaceEventLoopGroup
-
shutdownGracefully
Deprecated.Description copied from interface:EventExecutorGroupSignals 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:
shutdownGracefullyin 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 ofquietPeriodandtimeout- Returns:
- the
EventExecutorGroup.terminationFuture()
-
terminationFuture
Deprecated.Description copied from interface:EventExecutorGroupReturns theFuturewhich is notified when allEventExecutors managed by thisEventExecutorGrouphave been terminated.- Specified by:
terminationFuturein interfaceEventExecutorGroup
-
shutdown
Deprecated.- Specified by:
shutdownin interfaceEventExecutorGroup- Specified by:
shutdownin interfaceExecutorService- Specified by:
shutdownin classAbstractEventExecutorGroup
-
isShuttingDown
public boolean isShuttingDown()Deprecated.Description copied from interface:EventExecutorGroupReturnstrueif and only if allEventExecutors managed by thisEventExecutorGroupare being shut down gracefully or was shut down.- Specified by:
isShuttingDownin interfaceEventExecutorGroup
-
isShutdown
-
isTerminated
-
awaitTermination
Deprecated.- Specified by:
awaitTerminationin interfaceExecutorService- Throws:
InterruptedException
-
register
Deprecated.Description copied from interface:EventLoopGroupRegister aChannelwith thisEventLoop. The returnedChannelFuturewill get notified once the registration was complete.- Specified by:
registerin interfaceEventLoopGroup
-
register
Deprecated.Description copied from interface:EventLoopGroupRegister aChannelwith thisEventLoopusing aChannelFuture. The passedChannelFuturewill get notified once the registration was complete and also will get returned.- Specified by:
registerin interfaceEventLoopGroup
-
register
Deprecated.Description copied from interface:EventLoopGroupRegister aChannelwith thisEventLoop. The passedChannelFuturewill get notified once the registration was complete and also will get returned.- Specified by:
registerin interfaceEventLoopGroup
-