Package io.netty.util.concurrent
Class DefaultEventExecutorGroup
- java.lang.Object
-
- io.netty.util.concurrent.AbstractEventExecutorGroup
-
- io.netty.util.concurrent.MultithreadEventExecutorGroup
-
- io.netty.util.concurrent.DefaultEventExecutorGroup
-
- All Implemented Interfaces:
EventExecutorGroup,java.lang.Iterable<EventExecutor>,java.util.concurrent.Executor,java.util.concurrent.ExecutorService,java.util.concurrent.ScheduledExecutorService
public class DefaultEventExecutorGroup extends MultithreadEventExecutorGroup
Default implementation ofMultithreadEventExecutorGroupwhich will useDefaultEventExecutorinstances to handle the tasks.
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EventExecutornewChild(java.util.concurrent.Executor executor, java.lang.Object... args)Create a new EventExecutor which will later then accessible via theMultithreadEventExecutorGroup.next()method.-
Methods inherited from class io.netty.util.concurrent.MultithreadEventExecutorGroup
activeExecutorCount, awaitTermination, executorCount, executorUtilizations, isShutdown, isShuttingDown, isTerminated, iterator, newDefaultThreadFactory, next, shutdown, shutdownGracefully, terminationFuture
-
Methods inherited from class io.netty.util.concurrent.AbstractEventExecutorGroup
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.util.concurrent.EventExecutorGroup
ticker
-
-
-
-
Constructor Detail
-
DefaultEventExecutorGroup
public DefaultEventExecutorGroup(int nThreads)
-
DefaultEventExecutorGroup
public DefaultEventExecutorGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)Create a new instance.- Parameters:
nThreads- the number of threads that will be used by this instance.threadFactory- the ThreadFactory to use, ornullif the default should be used.
-
DefaultEventExecutorGroup
public DefaultEventExecutorGroup(int nThreads, java.util.concurrent.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, ornullif the default should be used.maxPendingTasks- the maximum number of pending tasks before new tasks will be rejected.rejectedHandler- theRejectedExecutionHandlerto use.
-
-
Method Detail
-
newChild
protected EventExecutor newChild(java.util.concurrent.Executor executor, java.lang.Object... args) throws java.lang.Exception
Description copied from class:MultithreadEventExecutorGroupCreate a new EventExecutor which will later then accessible via theMultithreadEventExecutorGroup.next()method. This method will be called for each thread that will serve thisMultithreadEventExecutorGroup.- Specified by:
newChildin classMultithreadEventExecutorGroup- Throws:
java.lang.Exception
-
-