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, wakesUpForTaskaddShutdownHook, 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, wakeupcancelScheduledTasks, hasScheduledTasks, nanoTime, nextScheduledTaskNano, pollScheduledTask, pollScheduledTask, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelayinEventLoop, iterator, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, safeExecute, shutdownGracefully, shutdownNow, submit, submit, submitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinEventLoop, inEventLoop, newFailedFuture, newProgressivePromise, newPromise, newSucceededFutureisShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuturepublic 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.