Package io.netty.channel.nio
Class NioEventLoopGroup
- java.lang.Object
-
- All Implemented Interfaces:
EventLoopGroup
,IoEventLoopGroup
,EventExecutorGroup
,java.lang.Iterable<EventExecutor>
,java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
,java.util.concurrent.ScheduledExecutorService
@Deprecated public class NioEventLoopGroup extends MultiThreadIoEventLoopGroup implements IoEventLoopGroup
Deprecated.
-
-
Constructor Summary
Constructors Constructor Description NioEventLoopGroup()
Deprecated.Create a new instance using the default number of threads, the defaultThreadFactory
and theSelectorProvider
which is returned bySelectorProvider.provider()
.NioEventLoopGroup(int nThreads)
Deprecated.Create a new instance using the specified number of threads,ThreadFactory
and theSelectorProvider
which is returned bySelectorProvider.provider()
.NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)
Deprecated.NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
Deprecated.NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler)
Deprecated.NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory)
Deprecated.NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory, EventLoopTaskQueueFactory tailTaskQueueFactory)
Deprecated.NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.nio.channels.spi.SelectorProvider selectorProvider)
Deprecated.NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
Deprecated.NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
Deprecated.Create a new instance using the specified number of threads, the givenThreadFactory
and theSelectorProvider
which is returned bySelectorProvider.provider()
.NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.nio.channels.spi.SelectorProvider selectorProvider)
Deprecated.Create a new instance using the specified number of threads, the givenThreadFactory
and the givenSelectorProvider
.NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
Deprecated.NioEventLoopGroup(java.util.concurrent.ThreadFactory threadFactory)
Deprecated.Create a new instance using the default number of threads, the givenThreadFactory
and theSelectorProvider
which is returned bySelectorProvider.provider()
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected IoEventLoop
newChild(java.util.concurrent.Executor executor, IoHandlerFactory ioHandlerFactory, java.lang.Object... args)
Deprecated.void
rebuildSelectors()
Deprecated.Replaces the currentSelector
s of the child event loops with newly createdSelector
s to work around the infamous epoll 100% CPU bug.void
setIoRatio(int ioRatio)
Deprecated.-
Methods inherited from class io.netty.channel.MultiThreadIoEventLoopGroup
newChild, next
-
Methods inherited from class io.netty.channel.MultithreadEventLoopGroup
newDefaultThreadFactory, 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
-
Methods inherited from interface io.netty.channel.EventLoopGroup
register
-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
-
Methods inherited from interface io.netty.channel.IoEventLoopGroup
isCompatible, isIoType, next, register, register, register
-
-
-
-
Constructor Detail
-
NioEventLoopGroup
public NioEventLoopGroup()
Deprecated.Create a new instance using the default number of threads, the defaultThreadFactory
and theSelectorProvider
which is returned bySelectorProvider.provider()
.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads)
Deprecated.Create a new instance using the specified number of threads,ThreadFactory
and theSelectorProvider
which is returned bySelectorProvider.provider()
.
-
NioEventLoopGroup
public NioEventLoopGroup(java.util.concurrent.ThreadFactory threadFactory)
Deprecated.Create a new instance using the default number of threads, the givenThreadFactory
and theSelectorProvider
which is returned bySelectorProvider.provider()
.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
Deprecated.Create a new instance using the specified number of threads, the givenThreadFactory
and theSelectorProvider
which is returned bySelectorProvider.provider()
.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)
Deprecated.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.nio.channels.spi.SelectorProvider selectorProvider)
Deprecated.Create a new instance using the specified number of threads, the givenThreadFactory
and the givenSelectorProvider
.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
Deprecated.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.nio.channels.spi.SelectorProvider selectorProvider)
Deprecated.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
Deprecated.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory)
Deprecated.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler)
Deprecated.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler, EventLoopTaskQueueFactory taskQueueFactory)
Deprecated.
-
NioEventLoopGroup
public NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.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, ornull
if default one should be used.chooserFactory
- theEventExecutorChooserFactory
to use.selectorProvider
- theSelectorProvider
to use.selectStrategyFactory
- theSelectStrategyFactory
to use.rejectedExecutionHandler
- theRejectedExecutionHandler
to use.taskQueueFactory
- theEventLoopTaskQueueFactory
to use forSingleThreadEventExecutor.execute(Runnable)
, ornull
if default one should be used.tailTaskQueueFactory
- theEventLoopTaskQueueFactory
to use forSingleThreadEventLoop.executeAfterEventLoopIteration(Runnable)
, ornull
if default one should be used.
-
-
Method Detail
-
setIoRatio
@Deprecated public void setIoRatio(int ioRatio)
Deprecated.This method is a no-op.
-
rebuildSelectors
public void rebuildSelectors()
Deprecated.Replaces the currentSelector
s of the child event loops with newly createdSelector
s to work around the infamous epoll 100% CPU bug.
-
newChild
protected IoEventLoop newChild(java.util.concurrent.Executor executor, IoHandlerFactory ioHandlerFactory, java.lang.Object... args)
Deprecated.Description copied from class:MultiThreadIoEventLoopGroup
- Overrides:
newChild
in classMultiThreadIoEventLoopGroup
- Parameters:
executor
- theExecutor
that should be used to handle execution of tasks and IO.ioHandlerFactory
- theIoHandlerFactory
that should be used to obtainIoHandler
to handle IO.args
- extra arguments that are based by the constructor.- Returns:
- the created
IoEventLoop
.
-
-