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, registerawaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, shutdown, shutdownGracefully, terminationFutureexecute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuturepublic 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.