软件包 | 描述 |
---|---|
io.netty.channel |
核心通道API是异步和事件驱动的各种传输(如
NIO Channel)的抽象 。
|
io.netty.channel.epoll |
针对Linux的优化传输,使用
EPOLL Edge-Triggered Mode获得最高性能。
|
io.netty.channel.kqueue |
BSD专用运输。
|
io.netty.channel.nio |
基于
NIO的通道API实现 - 推荐用于大量连接(> = 1000)。
|
io.netty.util.concurrent |
并发/异步任务的实用程序类。
|
Constructor and Description |
---|
SingleThreadEventLoop(EventLoopGroup parent, java.util.concurrent.Executor executor, boolean addTaskWakesUp, int maxPendingTasks, RejectedExecutionHandler rejectedExecutionHandler) |
SingleThreadEventLoop(EventLoopGroup parent, java.util.concurrent.ThreadFactory threadFactory, boolean addTaskWakesUp, int maxPendingTasks, RejectedExecutionHandler rejectedExecutionHandler) |
Constructor and Description |
---|
EpollEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler) |
Constructor and Description |
---|
KQueueEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler) |
Constructor and Description |
---|
NioEventLoopGroup(int nThreads, java.util.concurrent.Executor executor, EventExecutorChooserFactory chooserFactory, java.nio.channels.spi.SelectorProvider selectorProvider, SelectStrategyFactory selectStrategyFactory, RejectedExecutionHandler rejectedExecutionHandler) |
Modifier and Type | Method and Description |
---|---|
static RejectedExecutionHandler |
RejectedExecutionHandlers.backoff(int retries, long backoffAmount, java.util.concurrent.TimeUnit unit)
试图在任务无法添加到配置的时间量的应有限制时退避。
|
static RejectedExecutionHandler |
RejectedExecutionHandlers.reject()
返回 RejectedExecutionHandler ,将永远只是抛出一个RejectedExecutionException 。
|
Constructor and Description |
---|
DefaultEventExecutor(EventExecutorGroup parent, java.util.concurrent.Executor executor, int maxPendingTasks, RejectedExecutionHandler rejectedExecutionHandler) |
DefaultEventExecutor(EventExecutorGroup parent, java.util.concurrent.ThreadFactory threadFactory, int maxPendingTasks, RejectedExecutionHandler rejectedExecutionHandler) |
DefaultEventExecutorGroup(int nThreads, java.util.concurrent.ThreadFactory threadFactory, int maxPendingTasks, RejectedExecutionHandler rejectedHandler)
创建一个新的实例。
|
SingleThreadEventExecutor(EventExecutorGroup parent, java.util.concurrent.Executor executor, boolean addTaskWakesUp, int maxPendingTasks, RejectedExecutionHandler rejectedHandler)
创建一个新的实例
|
SingleThreadEventExecutor(EventExecutorGroup parent, java.util.concurrent.ThreadFactory threadFactory, boolean addTaskWakesUp, int maxPendingTasks, RejectedExecutionHandler rejectedHandler)
创建一个新的实例
|
Copyright © 2008–2018 The Netty Project. All rights reserved.