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, registerawaitTermination, executorCount, isShutdown, isShuttingDown, isTerminated, iterator, shutdown, shutdownGracefully, terminationFutureexecute, invokeAll, invokeAll, invokeAny, invokeAny, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuturepublic 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.