public abstract class MultithreadEventLoopGroup extends MultithreadEventExecutorGroup implements EventLoopGroup
EventLoopGroup
实现的抽象基类, 它们同时处理具有多个线程的任务。
Modifier | Constructor and Description |
---|---|
protected |
MultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.lang.Object... args) |
protected |
MultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.lang.Object... args) |
protected |
MultithreadEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
protected abstract EventLoop |
newChild(java.util.concurrent.Executor executor, java.lang.Object... args)
创建一个新的EventExecutor,然后通过
MultithreadEventExecutorGroup.next() 方法访问。
|
protected java.util.concurrent.ThreadFactory |
newDefaultThreadFactory() |
EventLoop |
next()
返回由此 EventExecutorGroup 管理的EventExecutor 个之一 。
|
ChannelFuture |
register(Channel channel)
|
ChannelFuture |
register(Channel channel, ChannelPromise promise)
已过时。
|
ChannelFuture |
register(ChannelPromise promise)
注册一个 Channel 这个EventLoop 使用ChannelFuture 。
|
awaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, shutdown, shutdownGracefully, terminationFuture
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
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.lang.Object... args)
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.lang.Object... args)
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.lang.Object... args)
protected java.util.concurrent.ThreadFactory newDefaultThreadFactory()
public EventLoop next()
EventExecutorGroup
EventExecutorGroup
管理的EventExecutor
之一 。
next
,界面
EventLoopGroup
next
,界面
EventExecutorGroup
next
在课堂上
MultithreadEventExecutorGroup
protected abstract EventLoop newChild(java.util.concurrent.Executor executor, java.lang.Object... args) throws java.lang.Exception
MultithreadEventExecutorGroup
MultithreadEventExecutorGroup.next()
方法访问。
这个方法将被用于每个将服务这个MultithreadEventExecutorGroup
的线程。
newChild
类
MultithreadEventExecutorGroup
java.lang.Exception
public ChannelFuture register(Channel channel)
EventLoopGroup
Channel
这个EventLoop
。
一旦注册完成,返回的ChannelFuture
将会收到通知。
register
,界面
EventLoopGroup
public ChannelFuture register(ChannelPromise promise)
EventLoopGroup
Channel
这个EventLoop
使用ChannelFuture
。
一旦注册完成,通过的ChannelFuture
将会收到通知,并且将返回。
register
,界面
EventLoopGroup
@Deprecated public ChannelFuture register(Channel channel, ChannelPromise promise)
EventLoopGroup
复制的描述
Channel
这个EventLoop
。
一旦注册完成,通过的ChannelFuture
将会收到通知,并且将返回。
register
in interface
EventLoopGroup
Copyright © 2008–2018 The Netty Project. All rights reserved.