Package io.netty.channel
Class MultithreadEventLoopGroup
java.lang.Object
io.netty.util.concurrent.AbstractEventExecutorGroup
io.netty.util.concurrent.MultithreadEventExecutorGroup
io.netty.channel.MultithreadEventLoopGroup
- All Implemented Interfaces:
EventLoopGroup
,EventExecutorGroup
,AutoCloseable
,Iterable<EventExecutor>
,Executor
,ExecutorService
,ScheduledExecutorService
- Direct Known Subclasses:
DefaultEventLoopGroup
,EpollEventLoopGroup
,KQueueEventLoopGroup
,NioEventLoopGroup
public abstract class MultithreadEventLoopGroup
extends MultithreadEventExecutorGroup
implements EventLoopGroup
Abstract base class for
EventLoopGroup
implementations that handles their tasks with multiple threads at
the same time.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MultithreadEventLoopGroup
(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, Object... args) protected
MultithreadEventLoopGroup
(int nThreads, Executor executor, Object... args) protected
MultithreadEventLoopGroup
(int nThreads, ThreadFactory threadFactory, Object... args) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract EventLoop
Create a new EventExecutor which will later then accessible via theMultithreadEventExecutorGroup.next()
method.protected ThreadFactory
next()
Returns one of theEventExecutor
s managed by thisEventExecutorGroup
.register
(ChannelPromise promise) register
(Channel channel, ChannelPromise promise) Deprecated.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
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, close, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
logger
-
DEFAULT_EVENT_LOOP_THREADS
private static final int DEFAULT_EVENT_LOOP_THREADS
-
-
Constructor Details
-
MultithreadEventLoopGroup
- See Also:
-
MultithreadEventLoopGroup
- See Also:
-
MultithreadEventLoopGroup
protected MultithreadEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, Object... args) - See Also:
-
-
Method Details
-
newDefaultThreadFactory
- Overrides:
newDefaultThreadFactory
in classMultithreadEventExecutorGroup
-
next
Description copied from interface:EventExecutorGroup
Returns one of theEventExecutor
s managed by thisEventExecutorGroup
.- Specified by:
next
in interfaceEventExecutorGroup
- Specified by:
next
in interfaceEventLoopGroup
- Overrides:
next
in classMultithreadEventExecutorGroup
-
newChild
Description copied from class:MultithreadEventExecutorGroup
Create 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:
newChild
in classMultithreadEventExecutorGroup
- Throws:
Exception
-
register
Description copied from interface:EventLoopGroup
Register aChannel
with thisEventLoop
. The returnedChannelFuture
will get notified once the registration was complete.- Specified by:
register
in interfaceEventLoopGroup
-
register
Description copied from interface:EventLoopGroup
Register aChannel
with thisEventLoop
using aChannelFuture
. The passedChannelFuture
will get notified once the registration was complete and also will get returned.- Specified by:
register
in interfaceEventLoopGroup
-
register
Deprecated.Description copied from interface:EventLoopGroup
Register aChannel
with thisEventLoop
. The passedChannelFuture
will get notified once the registration was complete and also will get returned.- Specified by:
register
in interfaceEventLoopGroup
-