GeezerVison is showing netty.io — ThreadPerChannelEventLoop (Netty API Reference (4.1.141.Final))
Class ThreadPerChannelEventLoop
-
-
-
Constructor Summary
Constructors
-
Method Summary
Modifier and Type
Method
Description
protected void
int
Deprecated.
Returns the number of Channels registered with this EventLoop or -1
if operation is not supported.
protected void
addShutdownHook, addTask, awaitTermination, cleanup, confirmShutdown, deadlineNanos, delayNanos, execute, inEventLoop, interruptThread, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isShuttingDown, isTerminated, lazyExecute, newTaskQueue, newTaskQueue, peekTask, pollTask, pollTaskFrom, reject, reject, removeShutdownHook, removeTask, runAllTasks, runAllTasks, runAllTasksFrom, runScheduledAndExecutorTasks, shutdown, shutdownGracefully, takeTask, terminationFuture, threadProperties, updateLastExecutionTime, wakesUpForTask, wakeup
Modifier and Type
Method
Description
void
Add a Runnable which will be executed on shutdown of this instance
protected void
boolean
protected void
Do nothing, sub-classes may override
protected boolean
Confirm that the shutdown if the instance should be done now!
protected long
protected long
Returns the amount of time left until the scheduled task with the closest dead line is executed.
void
boolean
Return true if the given Thread is executed in the event loop,
false otherwise.
protected void
Interrupt the current running Thread.
<T> T
<T> T
boolean
boolean
boolean
void
Like Executor.execute(Runnable) but does not guarantee the task will be run until either
a non-lazy task is executed or the executor is shut down.
Create a new Queue which will holds the tasks to execute.
protected static void
protected final void
void
Remove a previous added Runnable as a shutdown hook
protected boolean
protected boolean
Poll all tasks from the task queue and run them via Runnable.run() method.
protected boolean
Poll all tasks from the task queue and run them via Runnable.run() method.
protected final boolean
Runs all tasks from the passed taskQueue.
protected final boolean
Execute all expired scheduled tasks and all current tasks in the executor queue until both queues are empty,
or maxDrainAttempts has been exceeded.
void
Signals this executor that the caller wants the executor to be shut down.
Take the next Runnable from the task queue and so will block if no task is currently present.
protected void
Updates the internal timestamp that tells when a submitted task was executed most recently.
protected boolean
Can be overridden to control which tasks require waking the EventExecutor thread
if it is waiting so that they can be run immediately.
protected void
afterScheduledTaskSubmitted, beforeScheduledTaskSubmitted, cancelScheduledTasks, deadlineToDelayNanos, getCurrentTimeNanos, hasScheduledTasks, initialNanoTime, nanoTime, nextScheduledTaskDeadlineNanos, nextScheduledTaskNano, pollScheduledTask, pollScheduledTask, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, validateScheduled
Modifier and Type
Method
Description
protected boolean
protected boolean
Called from arbitrary non- EventExecutor threads prior to scheduled task submission.
protected void
Cancel all scheduled tasks.
protected static long
Given an arbitrary deadline deadlineNanos, calculate the number of nano seconds from now
deadlineNanos would expire.
protected long
Get the current time in nanoseconds by this executor's clock.
protected final boolean
Returns true if a scheduled task is ready for processing.
protected static long
The initial value used for delay and computations based upon a monatomic time source.
protected static long
protected final long
Return the deadline (in nanoseconds) when the next scheduled task is ready to be run or -1
if no task is scheduled.
protected final long
Return the nanoseconds until the next scheduled task is ready to be run or -1 if no task is scheduled.
Return the Runnable which is ready to be executed with the given nanoTime.
protected void
Deprecated.
will be removed in the future.
inEventLoop, iterator, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, newTaskFor, newTaskFor, runTask, safeExecute, shutdownGracefully, shutdownNow, submit, submit, submit
Modifier and Type
Method
Description
boolean
Create a new Future which is marked as failed already.
Create a new Future which is marked as succeeded already.
protected static void
protected static void
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ThreadPerChannelEventLoop
-
Method Details
-
-
-
-
deregister
protected void deregister()
Deprecated.
-
registeredChannels
public int registeredChannels()
Deprecated.
Returns the number of Channels registered with this EventLoop or -1
if operation is not supported. The returned value is not guaranteed to be exact accurate and
should be viewed as a best effort.
- Overrides:
registeredChannels in class SingleThreadEventLoop
|