| Modifier and Type | Field and Description |
|---|---|
| private long | frozenTimestamp
When time is frozen, the timestamp returned by |
| private long | startTime
When time is not |
| private final Queue | |
| private boolean | timeFrozen
Whether time is currently frozen. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public boolean | awaitTermination(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. |
| protected void | cancelScheduledTasks()
Overrides io. |
| public void | execute(Runnable
the runnable task command)Implements java. |
| pack-priv void | |
| protected long | getCurrentTimeNanos()
Overrides io. |
| pack-priv boolean | |
| public boolean | inEventLoop()
Overrides io. Implements io. inEventLoop(Thread) with Thread#currentThread() as argument
|
| public boolean | inEventLoop(Thread thread)
Implements io. true if the given Thread is executed in the event loop,
false otherwise.
|
| public boolean | isShutdown()
Implements java. true if this executor has been shut down.
|
| public boolean | isShuttingDown()
Implements io. true if and only if all EventExecutors managed by this EventExecutorGroup
are being shut down gracefully or was shut down.
|
| public boolean | isTerminated()
Implements java. true if all tasks have completed following shut down.
|
| public EventLoop | next()
Overrides io. Implements io. EventLoop to use
|
| pack-priv long | |
| public EventLoopGroup | parent()
Overrides io. Implements io. EventExecutorGroup which is the parent of this EventExecutor,
|
| public ChannelFuture | register(Channel channel)
Implements io. Channel with this EventLoop.
|
| public ChannelFuture | register(ChannelPromise promise)
Implements io. Channel with this EventLoop using a ChannelFuture.
|
| public ChannelFuture | register(Channel channel, ChannelPromise promise)
Implements io.
Deprecated
Register a Channel with this EventLoop.
|
| pack-priv long | |
| pack-priv void | |
| public void | shutdown()
Implements abstract io. Implements io.
Deprecated
Initiates an orderly shutdown in which previously submitted
tasks are executed, but no new tasks will be accepted.
|
| public Future | shutdownGracefully(long
the quiet period as described in the documentation quietPeriod, long the maximum amount of time to wait until the executor is shutdown()
regardless if a task was submitted during the quiet period timeout, TimeUnit the unit of unit)quietPeriod and timeoutImplements io. |
| public Future | terminationFuture()
Implements io. Future which is notified when all EventExecutors managed by this
EventExecutorGroup have been terminated.
|
| pack-priv void |
| frozenTimestamp | back to summary |
|---|---|
| private long frozenTimestamp When time is frozen, the timestamp returned by | |
| startTime | back to summary |
|---|---|
| private long startTime When time is not | |
| tasks | back to summary |
|---|---|
| private final Queue<Runnable> tasks | |
| timeFrozen | back to summary |
|---|---|
| private boolean timeFrozen Whether time is currently frozen. | |
| EmbeddedEventLoop | back to summary |
|---|---|
| pack-priv EmbeddedEventLoop() | |
| advanceTimeBy | back to summary |
|---|---|
| pack-priv void advanceTimeBy(long nanos) | |
| awaitTermination | back to summary |
|---|---|
| public boolean awaitTermination(long timeout, TimeUnit unit) Implements java. Doc from java. Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first. | |
| cancelScheduledTasks | back to summary |
|---|---|
| protected void cancelScheduledTasks() Overrides io. Doc from io. Cancel all scheduled tasks.
This method MUST be called only when
| |
| execute | back to summary |
|---|---|
| public void execute(Runnable command) Implements java. Doc from java. Executes the given command at some time in the future. The command
may execute in a new thread, in a pooled thread, or in the calling
thread, at the discretion of the | |
| freezeTime | back to summary |
|---|---|
| pack-priv void freezeTime() | |
| getCurrentTimeNanos | back to summary |
|---|---|
| protected long getCurrentTimeNanos() Overrides io. Doc from io. Get the current time in nanoseconds by this executor's clock. This is not the same as
| |
| hasPendingNormalTasks | back to summary |
|---|---|
| pack-priv boolean hasPendingNormalTasks() | |
| inEventLoop | back to summary |
|---|---|
| public boolean inEventLoop() Overrides io. Implements io. Doc from io. Calls
| |
| inEventLoop | back to summary |
|---|---|
| public boolean inEventLoop(Thread thread) Implements io. Doc from io. Return
| |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown() Implements java. Doc from java. Returns
| |
| isShuttingDown | back to summary |
|---|---|
| public boolean isShuttingDown() Implements io. Doc from io. Returns
| |
| isTerminated | back to summary |
|---|---|
| public boolean isTerminated() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public EventLoop next() Overrides io. Implements io. Doc from io. Return the next
| |
| nextScheduledTask | back to summary |
|---|---|
| pack-priv long nextScheduledTask() | |
| parent | back to summary |
|---|---|
| public EventLoopGroup parent() Overrides io. Implements io. Doc from io. Return the
| |
| register | back to summary |
|---|---|
| public ChannelFuture register(Channel channel) Implements io. Doc from io. Register a
| |
| register | back to summary |
|---|---|
| public ChannelFuture register(ChannelPromise promise) Implements io. Doc from io. Register a
| |
| register | back to summary |
|---|---|
| public ChannelFuture register(Channel channel, ChannelPromise promise) Implements io. Doc from io. Deprecated
Register a
| |
| runScheduledTasks | back to summary |
|---|---|
| pack-priv long runScheduledTasks() | |
| runTasks | back to summary |
|---|---|
| pack-priv void runTasks() | |
| shutdown | back to summary |
|---|---|
| public void shutdown() Implements abstract io. Implements io. Doc from java. Deprecated
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. Invocation has no additional effect if already shut down. This method does not wait for previously submitted tasks to
complete execution. Use
| |
| shutdownGracefully | back to summary |
|---|---|
| public Future Implements io. Doc from io. Signals this executor that the caller wants the executor to be shut down. Once this method is called,
| |
| terminationFuture | back to summary |
|---|---|
| public Future Implements io. Doc from io. Returns the
| |
| unfreezeTime | back to summary |
|---|---|
| pack-priv void unfreezeTime() | |