Package io.netty.channel
Class DefaultEventLoopGroup
- java.lang.Object
-
- io.netty.util.concurrent.AbstractEventExecutorGroup
-
- io.netty.util.concurrent.MultithreadEventExecutorGroup
-
- io.netty.channel.MultithreadEventLoopGroup
-
- io.netty.channel.DefaultEventLoopGroup
-
- All Implemented Interfaces:
EventLoopGroup,EventExecutorGroup,java.lang.Iterable<EventExecutor>,java.util.concurrent.Executor,java.util.concurrent.ExecutorService,java.util.concurrent.ScheduledExecutorService
- Direct Known Subclasses:
LocalEventLoopGroup
public class DefaultEventLoopGroup extends MultithreadEventLoopGroup
MultithreadEventLoopGroupwhich must be used for the local transport.
-
-
Constructor Summary
Constructors Constructor Description DefaultEventLoopGroup()Create a new instance with the default number of threads.DefaultEventLoopGroup(int nThreads)Create a new instanceDefaultEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)Create a new instanceDefaultEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)Create a new instanceDefaultEventLoopGroup(java.util.concurrent.ThreadFactory threadFactory)Create a new instance with the default number of threads and the givenThreadFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EventLoopnewChild(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.channel.MultithreadEventLoopGroup
newDefaultThreadFactory, next, register, register, register
-
Methods inherited from class io.netty.util.concurrent.MultithreadEventExecutorGroup
awaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, 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
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
-
-
-
-
Constructor Detail
-
DefaultEventLoopGroup
public DefaultEventLoopGroup()
Create a new instance with the default number of threads.
-
DefaultEventLoopGroup
public DefaultEventLoopGroup(int nThreads)
Create a new instance- Parameters:
nThreads- the number of threads to use
-
DefaultEventLoopGroup
public DefaultEventLoopGroup(java.util.concurrent.ThreadFactory threadFactory)
Create a new instance with the default number of threads and the givenThreadFactory.- Parameters:
threadFactory- theThreadFactoryornullto use the default
-
DefaultEventLoopGroup
public DefaultEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)Create a new instance- Parameters:
nThreads- the number of threads to usethreadFactory- theThreadFactoryornullto use the default
-
DefaultEventLoopGroup
public DefaultEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)Create a new instance- Parameters:
nThreads- the number of threads to useexecutor- the Executor to use, ornullif the default should be used.
-
-
Method Detail
-
newChild
protected EventLoop 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 classMultithreadEventLoopGroup- Throws:
java.lang.Exception
-
-