EventExecutorGroup
is responsible for providing the EventExecutor
's to use
via its next()
method. Besides this, it is also responsible for handling their
life-cycle and allows shutting them down in a global fashion.
Modifier and Type | Method and Description |
---|---|
public boolean | isShuttingDown()
Returns |
public Iterator | |
public EventExecutor | |
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)Redeclares java. |
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)Redeclares java. |
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)Redeclares java. 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)Redeclares java. |
public void | shutdown()
Redeclares java.
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 | Returns: theterminationFuture() Shortcut method for |
public Future | Returns: theterminationFuture() 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 Signals this executor that the caller wants the executor to be shut down. |
public List | shutdownNow()
Redeclares 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.
shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.
|
public Future | submit(Runnable
the task to submit task)Redeclares java. |
public <T> Future | submit(Runnable
the task to submit task, T the result to return result)Redeclares java. |
public <T> Future | submit(Callable<T>
the task to submit task)Redeclares java. |
public Future | terminationFuture()
Returns the |
isShuttingDown | back to summary |
---|---|
public boolean isShuttingDown() Returns |
iterator | back to summary |
---|---|
public Iterator Redeclares java. Doc from java. Returns an iterator over elements of type
|
next | back to summary |
---|---|
public EventExecutor next() Returns one of the |
schedule | back to summary |
---|---|
public ScheduledFuture Redeclares java. Doc from java. Submits a one-shot task that becomes enabled after the given delay.
|
schedule | back to summary |
---|---|
public <V> ScheduledFuture Redeclares java. Doc from java. Submits a value-returning one-shot task that becomes enabled after the given delay.
|
scheduleAtFixedRate | back to summary |
---|---|
public ScheduledFuture Redeclares java. 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 Redeclares java. 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 void shutdown() Redeclares java. 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 Shortcut method for
|
shutdownGracefully | back to summary |
---|---|
public Future Signals this executor that the caller wants the executor to be shut down. Once this method is called,
|
shutdownNow | back to summary |
---|---|
public List Redeclares java. 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 Redeclares java. 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 Redeclares java. 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 Redeclares java. 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 |
terminationFuture | back to summary |
---|---|
public Future Returns the |