程序包 | 说明 |
---|---|
io.netty.channel |
The core channel API which is asynchronous and event-driven abstraction of
various transports such as a
NIO Channel.
|
io.netty.channel.epoll |
Optimized transport for linux which uses EPOLL Edge-Triggered Mode
for maximal performance.
|
io.netty.channel.nio |
NIO-based channel
API implementation - recommended for a large number of connections (>= 1000).
|
io.netty.util.concurrent |
Utility classes for concurrent / async tasks.
|
构造器和说明 |
---|
SingleThreadEventLoop(EventLoopGroup parent,
java.util.concurrent.ThreadFactory threadFactory,
boolean addTaskWakesUp,
int maxPendingTasks,
RejectedExecutionHandler rejectedExecutionHandler) |
构造器和说明 |
---|
EpollEventLoopGroup(int nThreads,
java.util.concurrent.ThreadFactory threadFactory,
int maxEventsAtOnce,
SelectStrategyFactory selectStrategyFactory,
RejectedExecutionHandler rejectedExecutionHandler) |
构造器和说明 |
---|
NioEventLoopGroup(int nThreads,
java.util.concurrent.ThreadFactory threadFactory,
java.nio.channels.spi.SelectorProvider selectorProvider,
SelectStrategyFactory selectStrategyFactory,
RejectedExecutionHandler rejectedExecutionHandler) |
限定符和类型 | 方法和说明 |
---|---|
static RejectedExecutionHandler |
RejectedExecutionHandlers.backoff(int retries,
long backoffAmount,
java.util.concurrent.TimeUnit unit)
Tries to backoff when the task can not be added due restrictions for an configured amount of time.
|
static RejectedExecutionHandler |
RejectedExecutionHandlers.reject()
Returns a
RejectedExecutionHandler that will always just throw a RejectedExecutionException . |
构造器和说明 |
---|
DefaultEventExecutorGroup(int nThreads,
java.util.concurrent.ThreadFactory threadFactory,
int maxPendingTasks,
RejectedExecutionHandler rejectedHandler)
Create a new instance.
|
SingleThreadEventExecutor(EventExecutorGroup parent,
java.util.concurrent.ThreadFactory threadFactory,
boolean addTaskWakesUp,
int maxPendingTasks,
RejectedExecutionHandler rejectedHandler)
Create a new instance
|