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,java.lang.Iterable<EventExecutor>,java.util.concurrent.Executor,java.util.concurrent.ExecutorService,java.util.concurrent.ScheduledExecutorService
- Direct Known Subclasses:
DefaultEventLoopGroup,MultiThreadIoEventLoopGroup
public abstract class MultithreadEventLoopGroup extends MultithreadEventExecutorGroup implements EventLoopGroup
Abstract base class forEventLoopGroupimplementations that handles their tasks with multiple threads at the same time.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.lang.Object... args)protectedMultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.lang.Object... args)protectedMultithreadEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.lang.Object... args)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract EventLoopnewChild(java.util.concurrent.Executor executor, java.lang.Object... args)Create a new EventExecutor which will later then accessible via theMultithreadEventExecutorGroup.next()method.protected java.util.concurrent.ThreadFactorynewDefaultThreadFactory()EventLoopnext()Returns one of theEventExecutors managed by thisEventExecutorGroup.ChannelFutureregister(Channel channel)ChannelFutureregister(ChannelPromise promise)ChannelFutureregister(Channel channel, ChannelPromise promise)Deprecated.-
Methods inherited from class io.netty.util.concurrent.MultithreadEventExecutorGroup
activeExecutorCount, awaitTermination, executorCount, executorUtilizations, 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, ticker
-
-
-
-
Constructor Detail
-
MultithreadEventLoopGroup
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.lang.Object... args)
-
MultithreadEventLoopGroup
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.lang.Object... args)
-
MultithreadEventLoopGroup
protected MultithreadEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.lang.Object... args)
-
-
Method Detail
-
newDefaultThreadFactory
protected java.util.concurrent.ThreadFactory newDefaultThreadFactory()
- Overrides:
newDefaultThreadFactoryin classMultithreadEventExecutorGroup
-
next
public EventLoop next()
Description copied from interface:EventExecutorGroupReturns one of theEventExecutors managed by thisEventExecutorGroup.- Specified by:
nextin interfaceEventExecutorGroup- Specified by:
nextin interfaceEventLoopGroup- Overrides:
nextin classMultithreadEventExecutorGroup
-
newChild
protected abstract 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 classMultithreadEventExecutorGroup- Throws:
java.lang.Exception
-
register
public ChannelFuture register(Channel channel)
Description copied from interface:EventLoopGroupRegister aChannelwith thisEventLoop. The returnedChannelFuturewill get notified once the registration was complete.- Specified by:
registerin interfaceEventLoopGroup
-
register
public ChannelFuture register(ChannelPromise promise)
Description copied from interface:EventLoopGroupRegister aChannelwith thisEventLoopusing aChannelFuture. The passedChannelFuturewill get notified once the registration was complete and also will get returned.- Specified by:
registerin interfaceEventLoopGroup
-
register
@Deprecated public ChannelFuture register(Channel channel, ChannelPromise promise)
Deprecated.Description copied from interface:EventLoopGroupRegister aChannelwith thisEventLoop. The passedChannelFuturewill get notified once the registration was complete and also will get returned.- Specified by:
registerin interfaceEventLoopGroup
-
-