|
|||||||||
| Home >> All >> edu >> emory >> mathcs >> util >> [ concurrent overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
edu.emory.mathcs.util.concurrent
Interface ExecutorService

- All Superinterfaces:
- Executor
- public interface ExecutorService
- extends Executor
An executor that provides methods to manage termination. An ExecutorService can be shut down, which will cause it to stop accepting new tasks. After being shut down, the executor will eventually terminate, at which point no tasks are actively executing, no tasks are awaiting execution, and no new tasks can be submitted.
The Executors class provides factory methods for the executor services provided in edu.emory.mathcs.util.concurrent.
- Since:
- 1.5
| Method Summary | |
boolean |
awaitTermination(long timeout,
TimeUnit unit)
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first. |
boolean |
isShutdown()
Returns true if this executor has been shut down. |
boolean |
isTerminated()
Returns true if all tasks have completed following shut down. |
void |
shutdown()
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. |
java.util.List |
shutdownNow()
Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution. |
| Methods inherited from interface edu.emory.mathcs.util.concurrent.Executor |
execute |
| Method Detail |
shutdown
public void shutdown()
- Initiates an orderly shutdown in which previously submitted tasks
are executed, but no new tasks will be accepted.
shutdownNow
public java.util.List shutdownNow()
- Attempts to stop all actively executing tasks, halts the
processing of waiting tasks, and returns a list of the tasks that were
awaiting execution.
There are no guarantees beyond best-effort attempts to stop processing actively executing tasks. For example, typical implementations will cancel via Thread.interrupt()>
Thread.interrupt()55 , so if any tasks mask or fail to respond to interrupts, they may never terminate.
isShutdown
public boolean isShutdown()
- Returns true if this executor has been shut down.
isTerminated
public boolean isTerminated()
- Returns true if all tasks have completed following shut down.
Note that isTerminated is never true unless
either shutdown or shutdownNow was called first.
awaitTermination
public boolean awaitTermination(long timeout,
TimeUnit unit)
throws java.lang.InterruptedException
- Blocks until all tasks have completed execution after a shutdown
request, or the timeout occurs, or the current thread is
interrupted, whichever happens first.
|
|||||||||
| Home >> All >> edu >> emory >> mathcs >> util >> [ concurrent overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC