public class DefaultEventExecutorGroup extends MultithreadEventExecutorGroup
MultithreadEventExecutorGroup
,它将使用DefaultEventExecutor
实例来处理任务。
Constructor and Description |
---|
DefaultEventExecutorGroup(int nThreads) |
DefaultEventExecutorGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
创建一个新的实例。
|
DefaultEventExecutorGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxPendingTasks, RejectedExecutionHandler rejectedHandler)
创建一个新的实例。
|
Modifier and Type | Method and Description |
---|---|
protected EventExecutor |
newChild(java.util.concurrent.Executor executor, java.lang.Object... args)
创建一个新的EventExecutor,然后通过
MultithreadEventExecutorGroup.next() 方法访问。
|
awaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, newDefaultThreadFactory, next, shutdown, shutdownGracefully, terminationFuture
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
public DefaultEventExecutorGroup(int nThreads)
public DefaultEventExecutorGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
nThreads
- 此实例将使用的线程数。
threadFactory
- 要使用的ThreadFactory,或者
null
如果使用默认值)。
public DefaultEventExecutorGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxPendingTasks, RejectedExecutionHandler rejectedHandler)
nThreads
- 此实例将使用的线程数。
threadFactory
- 要使用的ThreadFactory,或者
null
如果应该使用默认值)。
maxPendingTasks
- 新任务将被拒绝之前的最大未决任务数。
rejectedHandler
- RejectedExecutionHandler
使用。
protected EventExecutor newChild(java.util.concurrent.Executor executor, java.lang.Object... args) throws java.lang.Exception
MultithreadEventExecutorGroup
MultithreadEventExecutorGroup.next()
方法访问。
这个方法将被调用,每个线程将服务于这个MultithreadEventExecutorGroup
。
newChild
在课堂
MultithreadEventExecutorGroup
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.