@UnstableApi public final class KQueueEventLoopGroup extends MultithreadEventLoopGroup
Constructor and Description |
---|
KQueueEventLoopGroup()
使用默认线程数和默认值
ThreadFactory 创建一个新实例。
|
KQueueEventLoopGroup(int nThreads)
使用指定数量的线程和默认值
ThreadFactory 创建一个新实例。
|
KQueueEventLoopGroup(int nThreads, java.util.concurrent.Executor executor) |
KQueueEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory) |
KQueueEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler) |
KQueueEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, SelectStrategyFactory selectStrategyFactory) |
KQueueEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory)
使用指定数量的线程和默认值
ThreadFactory 创建一个新实例。
|
KQueueEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
使用指定数量的线程和给定的
ThreadFactory 创建一个新实例。
|
KQueueEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce)
|
KQueueEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce, SelectStrategyFactory selectStrategyFactory)
|
KQueueEventLoopGroup(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 KQueueEventLoopGroup()
ThreadFactory
创建一个新实例。
public KQueueEventLoopGroup(int nThreads)
ThreadFactory
创建一个新实例。
public KQueueEventLoopGroup(int nThreads, SelectStrategyFactory selectStrategyFactory)
ThreadFactory
创建新实例。
public KQueueEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
ThreadFactory
创建一个新实例。
public KQueueEventLoopGroup(int nThreads, java.util.concurrent.Executor executor)
public KQueueEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, SelectStrategyFactory selectStrategyFactory)
ThreadFactory
创建一个新实例。
@Deprecated public KQueueEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce)
ThreadFactory
和给定的最大数量的epoll事件来处理每个epollWait(...)。
@Deprecated public KQueueEventLoopGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxEventsAtOnce, SelectStrategyFactory selectStrategyFactory)
KQueueEventLoopGroup(int)
, KQueueEventLoopGroup(int, ThreadFactory)
,或KQueueEventLoopGroup(int, SelectStrategyFactory)
ThreadFactory
和给定的最大数量的epoll事件来处理每个epollWait(...)。
public KQueueEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, SelectStrategyFactory selectStrategyFactory)
public KQueueEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory)
public KQueueEventLoopGroup(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.