EventExecutor implementations.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | AbstractEventExecutor.LazyRunnable
Deprecated
override
SingleThreadEventExecutor#wakesUpForTask to re-create this behaviour
|
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long | |
| pack-priv static final long | |
| private static final InternalLogger | |
| private final EventExecutorGroup | |
| private final Collection |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | inEventLoop()
Implements io. inEventLoop(Thread) with Thread#currentThread() as argument
|
| public Iterator | iterator()
Implements io. T.
|
| public void | lazyExecute(Runnable task)
Like |
| public <V> Future | newFailedFuture(Throwable cause)
Implements io. Future which is marked as failed already.
|
| public <V> ProgressivePromise | newProgressivePromise()
Implements io. ProgressivePromise.
|
| public <V> Promise | |
| public <V> Future | newSucceededFuture(V result)
Implements io. Future which is marked as succeeded already.
|
| protected final <T> RunnableFuture | newTaskFor(Runnable
the runnable task being wrapped runnable, T the default value for the returned future value)Overrides java. RunnableFuture for the given runnable and default
value.
|
| protected final <T> RunnableFuture | newTaskFor(Callable<T>
the callable task being wrapped callable)Overrides java. RunnableFuture for the given callable task.
|
| public EventExecutor | |
| public EventExecutorGroup | parent()
Implements io. EventExecutorGroup which is the parent of this EventExecutor,
|
| protected static void | |
| protected static void | |
| public ScheduledFuture | schedule(Runnable
the task to execute command, long the time from now to delay execution delay, TimeUnit the time unit of the delay parameter unit)Implements io. |
| public <V> ScheduledFuture | schedule(Callable<V>
the function to execute callable, long the time from now to delay execution delay, TimeUnit the time unit of the delay parameter unit)Implements io. |
| public ScheduledFuture | scheduleAtFixedRate(Runnable
the task to execute command, long the time to delay first execution initialDelay, long the period between successive executions period, TimeUnit the time unit of the initialDelay and period parameters unit)Implements io. initialDelay, then initialDelay + period, then
initialDelay + 2 * period, and so on.
|
| public ScheduledFuture | scheduleWithFixedDelay(Runnable
the task to execute command, long the time to delay first execution initialDelay, long the delay between the termination of one
execution and the commencement of the next delay, TimeUnit the time unit of the initialDelay and delay parameters unit)Implements io. |
| public abstract void | shutdown()
Redeclares io.
Deprecated
Initiates an orderly shutdown in which previously submitted
tasks are executed, but no new tasks will be accepted.
shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.
|
| public Future | shutdownGracefully()
Implements io. shutdownGracefully(long, long, TimeUnit) with sensible default values.
|
| public List | shutdownNow()
Implements io.
Deprecated
Attempts to stop all actively executing tasks, halts the
processing of waiting tasks, and returns a list of the tasks
that were awaiting execution.
shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.
|
| public Future | submit(Runnable
the task to submit task)Overrides java. Implements io. |
| public <T> Future | submit(Runnable
the task to submit task, T the result to return result)Overrides java. Implements io. |
| public <T> Future | submit(Callable<T>
the task to submit task)Overrides java. Implements io. |
| DEFAULT_SHUTDOWN_QUIET_PERIOD | back to summary |
|---|---|
| pack-priv static final long DEFAULT_SHUTDOWN_QUIET_PERIOD | |
| DEFAULT_SHUTDOWN_TIMEOUT | back to summary |
|---|---|
| pack-priv static final long DEFAULT_SHUTDOWN_TIMEOUT | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| parent | back to summary |
|---|---|
| private final EventExecutorGroup parent | |
| selfCollection | back to summary |
|---|---|
| private final Collection<EventExecutor> selfCollection | |
| AbstractEventExecutor | back to summary |
|---|---|
| protected AbstractEventExecutor() | |
| AbstractEventExecutor | back to summary |
|---|---|
| protected AbstractEventExecutor(EventExecutorGroup parent) | |
| inEventLoop | back to summary |
|---|---|
| public boolean inEventLoop() Implements io. Doc from io. Calls
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements io. Doc from java. Returns an iterator over elements of type
| |
| lazyExecute | back to summary |
|---|---|
| public void lazyExecute(Runnable task) Like
The default implementation just delegates to
| |
| newFailedFuture | back to summary |
|---|---|
| public <V> Future Implements io. Doc from io. Create a new
| |
| newProgressivePromise | back to summary |
|---|---|
| public <V> ProgressivePromise Implements io. Doc from io. Create a new
| |
| newPromise | back to summary |
|---|---|
| public <V> Promise Implements io. Doc from io. Return a new
| |
| newSucceededFuture | back to summary |
|---|---|
| public <V> Future Implements io. Doc from io. Create a new
| |
| newTaskFor | back to summary |
|---|---|
| protected final <T> RunnableFuture Overrides java. Doc from java. Returns a
| |
| newTaskFor | back to summary |
|---|---|
| protected final <T> RunnableFuture Overrides java. Doc from java. Returns a
| |
| next | back to summary |
|---|---|
| public EventExecutor next() Implements io. Doc from io. Returns a reference to itself.
| |
| parent | back to summary |
|---|---|
| public EventExecutorGroup parent() Implements io. Doc from io. Return the
| |
| runTask | back to summary |
|---|---|
| protected static void runTask(Runnable task) | |
| safeExecute | back to summary |
|---|---|
| protected static void safeExecute(Runnable task) Try to execute the given | |
| schedule | back to summary |
|---|---|
| public ScheduledFuture Implements io. Doc from java. Submits a one-shot task that becomes enabled after the given delay.
| |
| schedule | back to summary |
|---|---|
| public <V> ScheduledFuture Implements io. Doc from java. Submits a value-returning one-shot task that becomes enabled after the given delay.
| |
| scheduleAtFixedRate | back to summary |
|---|---|
| public ScheduledFuture Implements io. Doc from java. Submits a periodic action that becomes enabled first after the
given initial delay, and subsequently with the given period;
that is, executions will commence after
The sequence of task executions continues indefinitely until one of the following exceptional completions occur:
isDone() on the returned future will
return true.
If any execution of this task takes longer than its period, then subsequent executions may start late, but will not concurrently execute.
| |
| scheduleWithFixedDelay | back to summary |
|---|---|
| public ScheduledFuture Implements io. Doc from java. Submits a periodic action that becomes enabled first after the given initial delay, and subsequently with the given delay between the termination of one execution and the commencement of the next. The sequence of task executions continues indefinitely until one of the following exceptional completions occur:
isDone() on the returned future will
return true.
| |
| shutdown | back to summary |
|---|---|
| public abstract void shutdown() Redeclares 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. Shortcut method for
| |
| shutdownNow | back to summary |
|---|---|
| public List Implements io. Doc from java. Deprecated
Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution. This method does not wait for actively executing tasks to
terminate. Use There are no guarantees beyond best-effort attempts to stop
processing actively executing tasks. For example, typical
implementations will cancel via | |
| submit | back to summary |
|---|---|
| public Future Overrides java. Implements io. Doc from java. Submits a Runnable task for execution and returns a Future
representing that task. The Future's | |
| submit | back to summary |
|---|---|
| public <T> Future Overrides java. Implements io. Doc from java. Submits a Runnable task for execution and returns a Future
representing that task. The Future's | |
| submit | back to summary |
|---|---|
| public <T> Future Overrides java. Implements io. Doc from java. Submits a value-returning task for execution and returns a
Future representing the pending results of the task. The
Future's
If you would like to immediately block waiting
for a task, you can use constructions of the form
Note The | |
Deprecated
override SingleThreadEventExecutor#wakesUpForTask to re-create this behaviour