Class NioEventLoopGroup
- All Implemented Interfaces:
EventLoopGroup, IoEventLoopGroup, EventExecutorGroup, Iterable<EventExecutor>, Executor, ExecutorService, ScheduledExecutorService
@Deprecated
public class NioEventLoopGroup
extends MultiThreadIoEventLoopGroup
implements IoEventLoopGroup
Deprecated.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Create a new instance using the default number of threads, the defaultThreadFactoryand theSelectorProviderwhich is returned bySelectorProvider.provider().NioEventLoopGroup(int nThreads) Deprecated.Create a new instance using the specified number of threads,ThreadFactoryand theSelectorProviderwhich is returned bySelectorProvider.provider().NioEventLoopGroup(int nThreads, Executor executor) Deprecated.NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory) Deprecated.NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler) Deprecated.NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory) Deprecated.NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory, EventLoopTaskQueueFactory tailTaskQueueFactory) Deprecated.NioEventLoopGroup(int nThreads, Executor executor, SelectorProvider selectorProvider) Deprecated.NioEventLoopGroup(int nThreads, Executor executor, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory) Deprecated.NioEventLoopGroup(int nThreads, ThreadFactory threadFactory) Deprecated.Create a new instance using the specified number of threads, the givenThreadFactoryand theSelectorProviderwhich is returned bySelectorProvider.provider().NioEventLoopGroup(int nThreads, ThreadFactory threadFactory, SelectorProvider selectorProvider) Deprecated.Create a new instance using the specified number of threads, the givenThreadFactoryand the givenSelectorProvider.NioEventLoopGroup(int nThreads, ThreadFactory threadFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory) Deprecated.NioEventLoopGroup(ThreadFactory threadFactory) Deprecated.Create a new instance using the default number of threads, the givenThreadFactoryand theSelectorProviderwhich is returned bySelectorProvider.provider(). -
Method Summary
Modifier and TypeMethodDescriptionprotected IoEventLoopnewChild(Executor executor, IoHandlerFactory ioHandlerFactory, Object... args) Deprecated.voidDeprecated.voidsetIoRatio(int ioRatio) Deprecated.Methods inherited from class MultiThreadIoEventLoopGroup
newChild, nextModifier and TypeMethodDescriptionprotected EventLoopCreate a new EventExecutor which will later then accessible via theMultithreadEventExecutorGroup.next()method.next()Returns one of theEventExecutors managed by thisEventExecutorGroup.Methods inherited from class MultithreadEventLoopGroup
newDefaultThreadFactory, register, register, registerModifier and TypeMethodDescriptionprotected ThreadFactoryregister(ChannelPromise promise) register(Channel channel, ChannelPromise promise) Deprecated.Methods inherited from class MultithreadEventExecutorGroup
activeExecutorCount, awaitTermination, executorCount, executorUtilizations, isShutdown, isShuttingDown, isTerminated, iterator, shutdown, shutdownGracefully, terminationFutureModifier and TypeMethodDescriptionintReturns the number of currently active threads if the group is using anEventExecutorChooserFactory.ObservableEventExecutorChooser.booleanawaitTermination(long timeout, TimeUnit unit) final intReturn the number ofEventExecutorthis implementation uses.Returns a list of real-time utilization metrics if the group was configured with a compatibleEventExecutorChooserFactory, otherwise an empty list.booleanbooleanReturnstrueif and only if allEventExecutors managed by thisEventExecutorGroupare being shut down gracefully or was shut down.booleaniterator()voidshutdown()Deprecated.Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) Signals this executor that the caller wants the executor to be shut down.Future<?> Returns theFuturewhich is notified when allEventExecutors managed by thisEventExecutorGrouphave been terminated.Methods inherited from class AbstractEventExecutorGroup
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submitModifier and TypeMethodDescriptionvoidinvokeAll(Collection<? extends Callable<T>> tasks) invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) <T> TinvokeAny(Collection<? extends Callable<T>> tasks) <T> TinvokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) <V> ScheduledFuture<V> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) Future<?> Shortcut method forEventExecutorGroup.shutdownGracefully(long, long, TimeUnit)with sensible default values.Future<?> <T> Future<T> <T> Future<T> Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EventExecutorGroup
tickerMethods inherited from interface IoEventLoopGroup
isCompatible, isIoType, register, register, registerModifier and TypeMethodDescriptiondefault booleanisCompatible(Class<? extends IoHandle> handleType) Returnstrueif the given type is compatible with thisIoEventLoopGroupand so can be registered to the containedIoEventLoops,falseotherwise.default booleandefault ChannelFutureDeprecated.default ChannelFutureregister(ChannelPromise promise) Deprecated.default Future<IoRegistration> Methods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
NioEventLoopGroup
public NioEventLoopGroup()Deprecated.Create a new instance using the default number of threads, the defaultThreadFactoryand theSelectorProviderwhich is returned bySelectorProvider.provider(). -
NioEventLoopGroup
public NioEventLoopGroup(int nThreads) Deprecated.Create a new instance using the specified number of threads,ThreadFactoryand theSelectorProviderwhich is returned bySelectorProvider.provider(). -
NioEventLoopGroup
Deprecated.Create a new instance using the default number of threads, the givenThreadFactoryand theSelectorProviderwhich is returned bySelectorProvider.provider(). -
NioEventLoopGroup
Deprecated.Create a new instance using the specified number of threads, the givenThreadFactoryand theSelectorProviderwhich is returned bySelectorProvider.provider(). -
NioEventLoopGroup
Deprecated. -
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, ThreadFactory threadFactory, SelectorProvider selectorProvider) Deprecated.Create a new instance using the specified number of threads, the givenThreadFactoryand the givenSelectorProvider. -
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, ThreadFactory threadFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory) Deprecated. -
NioEventLoopGroup
Deprecated. -
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, Executor executor, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory) Deprecated. -
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory) Deprecated. -
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler) Deprecated. -
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory) Deprecated. -
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory, EventLoopTaskQueueFactory tailTaskQueueFactory) Deprecated.- Parameters:
nThreads- the number of threads that will be used by this instance.executor- the Executor to use, ornullif default one should be used.chooserFactory- theEventExecutorChooserFactoryto use.selectorProvider- theSelectorProviderto use.selectStrategyFactory- theSelectStrategyFactoryto use.rejectedExecutionHandler- theRejectedExecutionHandlerto use.taskQueueFactory- theEventLoopTaskQueueFactoryto use forSingleThreadEventExecutor.execute(Runnable), ornullif default one should be used.tailTaskQueueFactory- theEventLoopTaskQueueFactoryto use forSingleThreadEventLoop.executeAfterEventLoopIteration(Runnable), ornullif default one should be used.
-
-
Method Details
-
setIoRatio
-
rebuildSelectors
-
newChild
protected IoEventLoop newChild(Executor executor, IoHandlerFactory ioHandlerFactory, Object... args) Deprecated.Description copied from class:MultiThreadIoEventLoopGroup- Overrides:
newChildin classMultiThreadIoEventLoopGroup- Parameters:
executor- theExecutorthat should be used to handle execution of tasks and IO.ioHandlerFactory- theIoHandlerFactorythat should be used to obtainIoHandlerto handle IO.args- extra arguments that are based by the constructor.- Returns:
- the created
IoEventLoop.
-
MultiThreadIoEventLoopGroupwithNioIoHandler.newFactory().