- java.lang.Object
-
- io.netty5.util.concurrent.MultithreadEventExecutorGroup
-
- io.netty5.util.concurrent.DefaultEventExecutorGroup
-
- All Implemented Interfaces:
EventExecutorGroup
,Iterable<EventExecutor>
,Executor
public class DefaultEventExecutorGroup extends MultithreadEventExecutorGroup
Default implementation ofMultithreadEventExecutorGroup
which will useSingleThreadEventExecutor
instances to handle the tasks.
-
-
Constructor Summary
Constructors Constructor Description DefaultEventExecutorGroup(int nThreads)
DefaultEventExecutorGroup(int nThreads, ThreadFactory threadFactory)
Create a new instance.DefaultEventExecutorGroup(int nThreads, ThreadFactory threadFactory, int maxPendingTasks, RejectedExecutionHandler rejectedHandler)
Create a new instance.
-
Method Summary
-
Methods inherited from class io.netty5.util.concurrent.MultithreadEventExecutorGroup
awaitTermination, executorCount, executors, isShutdown, isShuttingDown, isTerminated, iterator, newChild, next, shutdownGracefully, terminationFuture
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty5.util.concurrent.EventExecutorGroup
execute, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, submit, submit, submit
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
DefaultEventExecutorGroup
public DefaultEventExecutorGroup(int nThreads)
-
DefaultEventExecutorGroup
public DefaultEventExecutorGroup(int nThreads, ThreadFactory threadFactory)
Create a new instance.- Parameters:
nThreads
- the number of threads that will be used by this instance.threadFactory
- the ThreadFactory to use, ornull
if the default should be used.
-
DefaultEventExecutorGroup
public DefaultEventExecutorGroup(int nThreads, ThreadFactory threadFactory, int maxPendingTasks, RejectedExecutionHandler rejectedHandler)
Create a new instance.- Parameters:
nThreads
- the number of threads that will be used by this instance.threadFactory
- the ThreadFactory to use, ornull
if the default should be used.maxPendingTasks
- the maximum number of pending tasks before new tasks will be rejected.rejectedHandler
- theRejectedExecutionHandler
to use.
-
-