public abstract class SingleThreadEventLoop extends io.netty.util.concurrent.SingleThreadEventExecutor implements EventLoop
EventLoop
s that execute all its submitted tasks in a single thread.Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_MAX_PENDING_TASKS |
Modifier | Constructor and Description |
---|---|
protected |
SingleThreadEventLoop(EventLoopGroup parent,
Executor executor,
boolean addTaskWakesUp) |
protected |
SingleThreadEventLoop(EventLoopGroup parent,
Executor executor,
boolean addTaskWakesUp,
int maxPendingTasks,
io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler) |
protected |
SingleThreadEventLoop(EventLoopGroup parent,
ThreadFactory threadFactory,
boolean addTaskWakesUp) |
protected |
SingleThreadEventLoop(EventLoopGroup parent,
ThreadFactory threadFactory,
boolean addTaskWakesUp,
int maxPendingTasks,
io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterRunningAllTasks() |
void |
executeAfterEventLoopIteration(Runnable task)
Adds a task to be run once at the end of next (or current)
eventloop iteration. |
protected boolean |
hasTasks() |
EventLoop |
next()
Return the next
EventLoop to use |
EventLoopGroup |
parent() |
int |
pendingTasks() |
ChannelFuture |
register(Channel channel)
|
ChannelFuture |
register(Channel channel,
ChannelPromise promise)
Deprecated.
|
ChannelFuture |
register(ChannelPromise promise)
|
protected boolean |
wakesUpForTask(Runnable task) |
addShutdownHook, addTask, awaitTermination, cleanup, confirmShutdown, deadlineNanos, delayNanos, execute, inEventLoop, interruptThread, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isShuttingDown, isTerminated, newTaskQueue, newTaskQueue, peekTask, pollTask, pollTaskFrom, reject, reject, removeShutdownHook, removeTask, run, runAllTasks, runAllTasks, runAllTasksFrom, shutdown, shutdownGracefully, takeTask, terminationFuture, threadProperties, updateLastExecutionTime, wakeup
cancelScheduledTasks, hasScheduledTasks, nanoTime, nextScheduledTaskNano, pollScheduledTask, pollScheduledTask, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, validateScheduled
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
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
forEach, spliterator
protected SingleThreadEventLoop(EventLoopGroup parent, ThreadFactory threadFactory, boolean addTaskWakesUp)
protected SingleThreadEventLoop(EventLoopGroup parent, Executor executor, boolean addTaskWakesUp)
protected SingleThreadEventLoop(EventLoopGroup parent, ThreadFactory threadFactory, boolean addTaskWakesUp, int maxPendingTasks, io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
protected SingleThreadEventLoop(EventLoopGroup parent, Executor executor, boolean addTaskWakesUp, int maxPendingTasks, io.netty.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
public EventLoopGroup parent()
public EventLoop next()
EventLoopGroup
EventLoop
to usenext
in interface EventLoopGroup
next
in interface io.netty.util.concurrent.EventExecutor
next
in interface io.netty.util.concurrent.EventExecutorGroup
next
in class io.netty.util.concurrent.AbstractEventExecutor
public ChannelFuture register(Channel channel)
EventLoopGroup
Channel
with this EventLoop
. The returned ChannelFuture
will get notified once the registration was complete.register
in interface EventLoopGroup
public ChannelFuture register(ChannelPromise promise)
EventLoopGroup
Channel
with this EventLoop
using a ChannelFuture
. The passed
ChannelFuture
will get notified once the registration was complete and also will get returned.register
in interface EventLoopGroup
@Deprecated public ChannelFuture register(Channel channel, ChannelPromise promise)
EventLoopGroup
Channel
with this EventLoop
. The passed ChannelFuture
will get notified once the registration was complete and also will get returned.register
in interface EventLoopGroup
@UnstableApi public final void executeAfterEventLoopIteration(Runnable task)
eventloop
iteration.task
- to be added.protected boolean wakesUpForTask(Runnable task)
wakesUpForTask
in class io.netty.util.concurrent.SingleThreadEventExecutor
protected void afterRunningAllTasks()
afterRunningAllTasks
in class io.netty.util.concurrent.SingleThreadEventExecutor
protected boolean hasTasks()
hasTasks
in class io.netty.util.concurrent.SingleThreadEventExecutor
public int pendingTasks()
pendingTasks
in class io.netty.util.concurrent.SingleThreadEventExecutor
Copyright © 2008–2019 The Netty Project. All rights reserved.