public class DefaultEventLoopGroup extends MultithreadEventLoopGroup
MultithreadEventLoopGroup
必须用于当地运输。
Constructor and Description |
---|
DefaultEventLoopGroup()
用默认的线程数创建一个新的实例。
|
DefaultEventLoopGroup(int nThreads)
创建一个新的实例
|
DefaultEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)
创建一个新的实例
|
DefaultEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
创建一个新的实例
|
Modifier and Type | Method and Description |
---|---|
protected EventLoop |
newChild(java.util.concurrent.Executor executor, java.lang.Object... args)
创建一个新的EventExecutor,然后通过
MultithreadEventExecutorGroup.next() 方法访问。
|
newDefaultThreadFactory, next, register, register, register
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
public DefaultEventLoopGroup()
public DefaultEventLoopGroup(int nThreads)
nThreads
- 要使用的线程数
public DefaultEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
nThreads
- 要使用的线程数
threadFactory
-
ThreadFactory
或
null
使用默认值
public DefaultEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)
nThreads
- 要使用的线程数
executor
- 要使用的执行程序,或
null
如果应使用默认值)。
protected EventLoop newChild(java.util.concurrent.Executor executor, java.lang.Object... args) throws java.lang.Exception
MultithreadEventExecutorGroup
MultithreadEventExecutorGroup.next()
方法访问。
这个方法将被用于每个会服务这个MultithreadEventExecutorGroup
的线程。
newChild
在课程
MultithreadEventLoopGroup
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.