public final class EpollEventLoopGroup extends MultithreadEventLoopGroup
EventLoopGroup
其中使用epoll的封面。
正因为如此,它只能在linux上运行。
Constructor and Description |
---|
EpollEventLoopGroup()
使用默认的线程数和默认值
ThreadFactory 创建一个新实例。
|
EpollEventLoopGroup(int nThreads)
使用指定数量的线程和默认值
ThreadFactory 创建一个新实例。
|
EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor) |
EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory) |
EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler) |
EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, SelectStrategyFactory selectStrategyFactory) |
EpollEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory)
使用指定数量的线程和默认值
ThreadFactory 创建一个新实例。
|
EpollEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
使用指定数量的线程和给定的
ThreadFactory 创建一个新实例。
|
EpollEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce)
|
EpollEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce, SelectStrategyFactory selectStrategyFactory)
|
EpollEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, SelectStrategyFactory selectStrategyFactory)
使用指定数量的线程和给定的
ThreadFactory 创建一个新实例。
|
Modifier and Type | Method and Description |
---|---|
protected EventLoop |
newChild(java.util.concurrent.Executor executor, java.lang.Object... args)
创建一个新的EventExecutor,然后通过
MultithreadEventExecutorGroup.next() 方法访问。
|
void |
setIoRatio(int ioRatio)
设置子事件循环中用于I / O所需时间的百分比。
|
newDefaultThreadFactory, next, register, register, register
awaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, shutdown, shutdownGracefully, terminationFuture
execute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
public EpollEventLoopGroup()
ThreadFactory
创建一个新实例。
public EpollEventLoopGroup(int nThreads)
ThreadFactory
创建一个新实例。
public EpollEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory)
ThreadFactory
创建一个新实例。
public EpollEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
ThreadFactory
创建一个新实例。
public EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)
public EpollEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, SelectStrategyFactory selectStrategyFactory)
ThreadFactory
创建一个新实例。
@Deprecated public EpollEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce)
ThreadFactory
和给定的最大数量的epoll事件来处理每个epollWait(...)。
@Deprecated public EpollEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce, SelectStrategyFactory selectStrategyFactory)
EpollEventLoopGroup(int)
, EpollEventLoopGroup(int, ThreadFactory)
,或EpollEventLoopGroup(int, SelectStrategyFactory)
ThreadFactory
和给定的最大数量的epoll事件来处理每个epollWait(...)。
public EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, SelectStrategyFactory selectStrategyFactory)
public EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory)
public EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler)
public void setIoRatio(int ioRatio)
50
,这意味着事件循环将尝试花费I / O的时间与非I / O任务的时间相同。
protected EventLoop newChild(java.util.concurrent.Executor executor, java.lang.Object... args) throws java.lang.Exception
MultithreadEventExecutorGroup
MultithreadEventExecutorGroup.next()
方法访问。
这个方法将被用于每个会服务这个MultithreadEventExecutorGroup
的线程。
newChild
在课堂上
MultithreadEventLoopGroup
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.