public class ThreadPerChannelEventLoop extends SingleThreadEventLoop
SingleThreadEventLoop
用于处理OIO Channel
的。
因此,在一般会有一个ThreadPerChannelEventLoop
每Channel
。
DEFAULT_MAX_PENDING_TASKS
Constructor and Description |
---|
ThreadPerChannelEventLoop(ThreadPerChannelEventLoopGroup parent) |
Modifier and Type | Method and Description |
---|---|
protected void |
deregister() |
ChannelFuture |
register(Channel channel, ChannelPromise promise)
已过时。
|
ChannelFuture |
register(ChannelPromise promise)
使用 ChannelFuture 通过此EventLoop 注册Channel 。
|
protected void |
run() |
afterRunningAllTasks, executeAfterEventLoopIteration, hasTasks, next, parent, pendingTasks, register, wakesUpForTask
addShutdownHook, addTask, awaitTermination, cleanup, confirmShutdown, delayNanos, execute, inEventLoop, interruptThread, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isShuttingDown, isTerminated, newTaskQueue, newTaskQueue, peekTask, pollTask, pollTaskFrom, reject, reject, removeShutdownHook, removeTask, runAllTasks, runAllTasks, runAllTasksFrom, shutdown, shutdownGracefully, takeTask, terminationFuture, threadProperties, updateLastExecutionTime, wakeup
cancelScheduledTasks, hasScheduledTasks, nanoTime, nextScheduledTaskNano, pollScheduledTask, pollScheduledTask, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay
inEventLoop, iterator, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, safeExecute, shutdownGracefully, shutdownNow, submit, submit, submit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
inEventLoop, inEventLoop, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
public ThreadPerChannelEventLoop(ThreadPerChannelEventLoopGroup parent)
public ChannelFuture register(ChannelPromise promise)
EventLoopGroup
复制的描述
Channel
这个EventLoop
使用ChannelFuture
。
一旦注册完成,通过的ChannelFuture
将会收到通知,并且会被退回。
register
在界面
EventLoopGroup
register
在课堂上
SingleThreadEventLoop
@Deprecated public ChannelFuture register(Channel channel, ChannelPromise promise)
EventLoopGroup
复制的描述
EventLoop
注册一个Channel
。
一旦注册完成并且将返回,通过的ChannelFuture
将会收到通知。
register
在界面
EventLoopGroup
register
在课堂上
SingleThreadEventLoop
protected void run()
run
在课堂上
SingleThreadEventExecutor
protected void deregister()
Copyright © 2008–2018 The Netty Project. All rights reserved.