@Deprecated public class ThreadPerChannelEventLoopGroup extends AbstractEventExecutorGroup implements EventLoopGroup
| 限定符 | 构造器和说明 |
|---|---|
protected |
ThreadPerChannelEventLoopGroup()
已过时。
Create a new
ThreadPerChannelEventLoopGroup with no limit in place. |
protected |
ThreadPerChannelEventLoopGroup(int maxChannels)
已过时。
Create a new
ThreadPerChannelEventLoopGroup. |
protected |
ThreadPerChannelEventLoopGroup(int maxChannels,
java.util.concurrent.Executor executor,
java.lang.Object... args)
已过时。
Create a new
ThreadPerChannelEventLoopGroup. |
protected |
ThreadPerChannelEventLoopGroup(int maxChannels,
java.util.concurrent.ThreadFactory threadFactory,
java.lang.Object... args)
已过时。
Create a new
ThreadPerChannelEventLoopGroup. |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
已过时。
|
boolean |
isShutdown()
已过时。
|
boolean |
isShuttingDown()
已过时。
Returns
true if and only if all EventExecutors managed by this EventExecutorGroup
are being shut down gracefully or was shut down. |
boolean |
isTerminated()
已过时。
|
java.util.Iterator<EventExecutor> |
iterator()
已过时。
|
protected EventLoop |
newChild(java.lang.Object... args)
已过时。
Creates a new
EventLoop. |
EventLoop |
next()
已过时。
Return the next
EventLoop to use |
ChannelFuture |
register(Channel channel)
已过时。
|
ChannelFuture |
register(Channel channel,
ChannelPromise promise)
已过时。
|
ChannelFuture |
register(ChannelPromise promise)
已过时。
|
void |
shutdown()
已过时。
|
Future<?> |
shutdownGracefully(long quietPeriod,
long timeout,
java.util.concurrent.TimeUnit unit)
已过时。
Signals this executor that the caller wants the executor to be shut down.
|
Future<?> |
terminationFuture()
已过时。
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, submitprotected 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,
java.util.concurrent.ThreadFactory threadFactory,
java.lang.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,
java.util.concurrent.Executor executor,
java.lang.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(java.lang.Object... args) throws java.lang.Exception
EventLoop. The default implementation creates a new ThreadPerChannelEventLoop.java.lang.Exceptionpublic java.util.Iterator<EventExecutor> iterator()
iterator 在接口中 EventExecutorGroupiterator 在接口中 java.lang.Iterable<EventExecutor>public EventLoop next()
EventLoopGroupEventLoop to usenext 在接口中 EventLoopGroupnext 在接口中 EventExecutorGrouppublic Future<?> shutdownGracefully(long quietPeriod, long timeout, java.util.concurrent.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 在接口中 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 在接口中 EventExecutorGroup@Deprecated public void shutdown()
shutdown 在接口中 EventExecutorGroupshutdown 在接口中 java.util.concurrent.ExecutorServiceshutdown 在类中 AbstractEventExecutorGrouppublic boolean isShuttingDown()
EventExecutorGrouptrue if and only if all EventExecutors managed by this EventExecutorGroup
are being shut down gracefully or was shut down.isShuttingDown 在接口中 EventExecutorGrouppublic boolean isShutdown()
isShutdown 在接口中 java.util.concurrent.ExecutorServicepublic boolean isTerminated()
isTerminated 在接口中 java.util.concurrent.ExecutorServicepublic boolean awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
awaitTermination 在接口中 java.util.concurrent.ExecutorServicejava.lang.InterruptedExceptionpublic ChannelFuture register(Channel channel)
EventLoopGroupChannel with this EventLoop. The returned ChannelFuture
will get notified once the registration was complete.register 在接口中 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 在接口中 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 在接口中 EventLoopGroup