|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchord.util.Executor
public final class Executor
Utility for executing a set of given tasks serially or in parallel.
| Constructor Summary | |
|---|---|
Executor(boolean serial)
Creates a new serial or parallel executor. |
|
| Method Summary | |
|---|---|
void |
execute(java.lang.Runnable task)
Executes given runnable task. |
void |
waitForCompletion()
Waits for completion of all submitted tasks and returns afterwards. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Executor(boolean serial)
serial - Flag indicating that executor is serial as opposed to parallel.| Method Detail |
|---|
public void execute(java.lang.Runnable task)
task - A task to be executed.
java.lang.IllegalArgumentException - if task is null.
public void waitForCompletion()
throws java.lang.InterruptedException
java.lang.InterruptedException - if any occurs during waiting for tasks to be completed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||