public abstract class SingleThreadEventLoop extends SingleThreadEventExecutor implements EventLoop
EventLoop's that execute all its submitted tasks in a single thread.| 限定符和类型 | 字段和说明 |
|---|---|
protected static int |
DEFAULT_MAX_PENDING_TASKS |
| 限定符 | 构造器和说明 |
|---|---|
protected |
SingleThreadEventLoop(EventLoopGroup parent,
java.util.concurrent.ThreadFactory threadFactory,
boolean addTaskWakesUp) |
protected |
SingleThreadEventLoop(EventLoopGroup parent,
java.util.concurrent.ThreadFactory threadFactory,
boolean addTaskWakesUp,
int maxPendingTasks,
RejectedExecutionHandler rejectedExecutionHandler) |
| 限定符和类型 | 方法和说明 |
|---|---|
EventLoop |
next()
Returns a reference to itself.
|
EventLoopGroup |
parent()
Return the
EventExecutorGroup which is the parent of this EventExecutor, |
ChannelFuture |
register(Channel channel)
|
ChannelFuture |
register(Channel channel,
ChannelPromise promise)
|
protected boolean |
wakesUpForTask(java.lang.Runnable task) |
addShutdownHook, addTask, awaitTermination, cleanup, confirmShutdown, delayNanos, execute, hasTasks, inEventLoop, interruptThread, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isShuttingDown, isTerminated, newTaskQueue, newTaskQueue, peekTask, pendingTasks, pollTask, reject, removeShutdownHook, removeTask, run, runAllTasks, runAllTasks, shutdown, shutdownGracefully, takeTask, terminationFuture, threadProperties, updateLastExecutionTime, wakeupcancelScheduledTasks, hasScheduledTasks, nanoTime, nextScheduledTaskNano, pollScheduledTask, pollScheduledTask, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelayinEventLoop, iterator, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, 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, terminationFutureprotected SingleThreadEventLoop(EventLoopGroup parent, java.util.concurrent.ThreadFactory threadFactory, boolean addTaskWakesUp)
SingleThreadEventExecutor#SingleThreadEventExecutor(EventExecutorGroup, ThreadFactory, boolean)}protected SingleThreadEventLoop(EventLoopGroup parent, java.util.concurrent.ThreadFactory threadFactory, boolean addTaskWakesUp, int maxPendingTasks, RejectedExecutionHandler rejectedExecutionHandler)
public EventLoopGroup parent()
EventExecutorEventExecutorGroup which is the parent of this EventExecutor,parent 在接口中 EventLoopparent 在接口中 EventExecutorparent 在类中 SingleThreadEventExecutorpublic EventLoop next()
EventExecutornext 在接口中 EventLoopGroupnext 在接口中 EventExecutornext 在接口中 EventExecutorGroupnext 在类中 AbstractEventExecutorpublic ChannelFuture register(Channel channel)
EventLoopGroupChannel with this EventLoop. The returned ChannelFuture
will get notified once the registration was complete.register 在接口中 EventLoopGrouppublic ChannelFuture register(Channel channel, ChannelPromise promise)
EventLoopGroupChannel with this EventLoop. The passed ChannelFuture
will get notified once the registration was complete and also will get returned.register 在接口中 EventLoopGroupprotected boolean wakesUpForTask(java.lang.Runnable task)