public class DefaultEventExecutorGroup extends MultithreadEventExecutorGroup
MultithreadEventExecutorGroup
which will use DefaultEventExecutor
instances
to handle the tasks.构造器和说明 |
---|
DefaultEventExecutorGroup(int nThreads) |
DefaultEventExecutorGroup(int nThreads,
java.util.concurrent.ThreadFactory threadFactory)
Create a new instance.
|
DefaultEventExecutorGroup(int nThreads,
java.util.concurrent.ThreadFactory threadFactory,
int maxPendingTasks,
RejectedExecutionHandler rejectedHandler)
Create a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
protected EventExecutor |
newChild(java.util.concurrent.Executor executor,
java.lang.Object... args)
Create a new EventExecutor which will later then accessible via the
MultithreadEventExecutorGroup.next() method. |
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
- the number of threads that will be used by this instance.threadFactory
- the ThreadFactory to use, or null
if the default should be used.public DefaultEventExecutorGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxPendingTasks, RejectedExecutionHandler rejectedHandler)
nThreads
- the number of threads that will be used by this instance.threadFactory
- the ThreadFactory to use, or null
if the default should be used.maxPendingTasks
- the maximum number of pending tasks before new tasks will be rejected.rejectedHandler
- the RejectedExecutionHandler
to use.protected EventExecutor newChild(java.util.concurrent.Executor executor, java.lang.Object... args) throws java.lang.Exception
MultithreadEventExecutorGroup
MultithreadEventExecutorGroup.next()
method. This method will be
called for each thread that will serve this MultithreadEventExecutorGroup
.newChild
在类中 MultithreadEventExecutorGroup
java.lang.Exception