|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.provision.service.tasks.Task
public abstract class Task
BaseTask
| Constructor Summary | |
|---|---|
Task(DefaultTaskCoordinator coordinator,
ContainerTask parent)
|
|
| Method Summary | |
|---|---|
void |
addDependent(Task dependent)
Adds dependent as a dependent of this task. |
void |
addPrerequisite(Task prereq)
Add's prereq as a Prerequisite of this task. |
protected void |
completeSubmit()
This method exists to allow a task to have no processing |
protected void |
doSubmit()
This method submits a task to be executed and is called when all dependencies are completed for that task This method should place a runnable on an executor or submit the task in some other way so that it will run as soon as possible. |
DefaultTaskCoordinator |
getCoordinator()
|
TaskMonitor |
getMonitor()
|
boolean |
isFinished()
This task's run method has completed |
boolean |
isScheduled()
This task has be sent to the TaskCoordinator to be run |
protected void |
markTaskAsCompleted()
|
protected void |
postSchedule()
|
protected void |
preSchedule()
|
void |
schedule()
This is called to add the task to the queue of tasks that can be considered to be runnable |
protected void |
submitRunnable(Runnable runnable,
String preferredExecutor)
|
String |
toString()
|
void |
waitFor()
Wait for this task to complete. |
void |
waitFor(long timeout,
TimeUnit unit)
Wait for this task to complete or until a timeout occurs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Task(DefaultTaskCoordinator coordinator,
ContainerTask parent)
| Method Detail |
|---|
public DefaultTaskCoordinator getCoordinator()
public TaskMonitor getMonitor()
protected void doSubmit()
protected void completeSubmit()
public void schedule()
protected void preSchedule()
protected void postSchedule()
public boolean isFinished()
public boolean isScheduled()
public void addPrerequisite(Task prereq)
public void addDependent(Task dependent)
public void waitFor()
throws InterruptedException,
ExecutionException
InterruptedException
ExecutionException
public void waitFor(long timeout,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionprotected void markTaskAsCompleted()
protected void submitRunnable(Runnable runnable,
String preferredExecutor)
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||