|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.hudson.reactor.Reactor
public class Reactor
Executes a set of Tasks that dependend on each other.
As a Set, this object represents a read-only view of all Tasks.
| Constructor Summary | |
|---|---|
Reactor(Collection<? extends TaskBuilder> builders)
|
|
Reactor(TaskBuilder... builders)
|
|
| Method Summary | |
|---|---|
void |
add(Task t)
Adds a new Task to the reactor. |
void |
addAll(Iterable<? extends Task> _tasks)
Adds a set of taks to the reactor. |
void |
execute(Executor e)
|
void |
execute(Executor e,
ReactorListener listener)
Executes this initialization session with the given executor. |
Iterator<org.jvnet.hudson.reactor.Reactor.Node> |
iterator()
|
protected void |
runTask(Task t)
Can be overridden by the subtype to enclose the entire execution of the task. |
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Reactor(Collection<? extends TaskBuilder> builders)
throws IOException
IOException
public Reactor(TaskBuilder... builders)
throws IOException
IOException| Method Detail |
|---|
public Iterator<org.jvnet.hudson.reactor.Reactor.Node> iterator()
iterator in interface Iterable<org.jvnet.hudson.reactor.Reactor.Node>public int size()
public void execute(Executor e)
throws InterruptedException,
ReactorException
InterruptedException
ReactorExceptionpublic void add(Task t)
Task to the reactor.
This can be even invoked during execution.
public void addAll(Iterable<? extends Task> _tasks)
When adding a series of related tasks, it's often necessary to add them as a bulk, or else the newly added task can start executing before its dependencies are added.
public void execute(Executor e,
ReactorListener listener)
throws InterruptedException,
ReactorException
e - Used for executing Tasks.listener - Receives callbacks during the execution.
InterruptedException - if this thread is interrupted while waiting for the execution of tasks to complete.
ReactorException - if one of the tasks failed by throwing an exception. The caller is responsible for canceling
existing Tasks that are in progress in Executor, if that's desired.
protected void runTask(Task t)
throws Exception
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||