Runnable
objects in the caller's thread. If the execute(Runnable)
is reentrant it will be
queued until the original Runnable
finishes execution.
All Throwable
objects thrown from execute(Runnable)
will be swallowed and logged. This is to ensure
that all queued Runnable
objects have the chance to be run.
Modifier and Type | Class and Description |
---|---|
pack-priv static class | |
pack-priv static class |
Modifier and Type | Field and Description |
---|---|
private static final FastThreadLocal | DELAYED_RUNNABLES
A Runnable will be queued if we are executing a Runnable. |
public static final ImmediateEventExecutor | |
private static final InternalLogger | |
private static final FastThreadLocal | RUNNING
Set to |
private final Future |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public boolean | awaitTermination(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. |
public void | execute(Runnable
the runnable task command)Implements java. |
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 EventExecutor s 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 <V> ProgressivePromise | |
public <V> Promise | newPromise()
Overrides io. Implements io. Promise .
|
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 timeout Implements io. |
public Future | terminationFuture()
Implements io. Future which is notified when all EventExecutor s managed by this
EventExecutorGroup have been terminated.
|
DELAYED_RUNNABLES | back to summary |
---|---|
private static final FastThreadLocal<Queue<Runnable>> DELAYED_RUNNABLES A Runnable will be queued if we are executing a Runnable. This is to prevent a |
INSTANCE | back to summary |
---|---|
public static final ImmediateEventExecutor INSTANCE |
logger | back to summary |
---|---|
private static final InternalLogger logger Hides io. |
RUNNING | back to summary |
---|---|
private static final FastThreadLocal<Boolean> RUNNING Set to |
terminationFuture | back to summary |
---|---|
private final Future<?> terminationFuture |
ImmediateEventExecutor | back to summary |
---|---|
private ImmediateEventExecutor() |
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. |
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 |
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
|
newProgressivePromise | back to summary |
---|---|
public <V> ProgressivePromise Overrides io. Implements io. Doc from io. Create a new
|
newPromise | back to summary |
---|---|
public <V> Promise Overrides io. Implements io. Doc from io. Return a new
|
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
|
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
protected void |
ImmediateProgressivePromise | back to summary |
---|---|
pack-priv ImmediateProgressivePromise(EventExecutor executor) |
checkDeadLock | back to summary |
---|---|
protected void checkDeadLock() Overrides io.
|
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
protected void |
ImmediatePromise | back to summary |
---|---|
pack-priv ImmediatePromise(EventExecutor executor) |
checkDeadLock | back to summary |
---|---|
protected void checkDeadLock() Overrides io.
|