org.opennms.netmgt.provision.service.tasks
Class SyncTask
java.lang.Object
org.opennms.netmgt.provision.service.tasks.Task
org.opennms.netmgt.provision.service.tasks.SyncTask
public class SyncTask
- extends Task
SyncTask
- Author:
- brozow
|
Method Summary |
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. |
String |
getPreferredExecutor()
|
void |
run()
This is the run method where the 'work' related to the Task gets down. |
void |
setPreferredExecutor(String preferredExecutor)
|
String |
toString()
|
| Methods inherited from class org.opennms.netmgt.provision.service.tasks.Task |
addDependent, addPrerequisite, completeSubmit, getCoordinator, getMonitor, isFinished, isScheduled, markTaskAsCompleted, postSchedule, preSchedule, schedule, submitRunnable, waitFor, waitFor |
DEFAULT_EXECUTOR
public static final String DEFAULT_EXECUTOR
- See Also:
- Constant Field Values
ADMIN_EXECUTOR
public static final String ADMIN_EXECUTOR
- See Also:
- Constant Field Values
SyncTask
public SyncTask(DefaultTaskCoordinator coordinator,
ContainerTask parent,
Runnable action)
SyncTask
public SyncTask(DefaultTaskCoordinator coordinator,
ContainerTask parent,
Runnable action,
String preferredExecutor)
doSubmit
protected void doSubmit()
- Description copied from class:
Task
- 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. Tasks that have no processing to be done may override completeSubmit to notify
the Task coordinator that the task is done.
- Overrides:
doSubmit in class Task
run
public void run()
- This is the run method where the 'work' related to the Task gets down. This method can be overridden
or a Runnable can be passed to the task in the constructor. The Task is not complete until this method
finishes
getPreferredExecutor
public String getPreferredExecutor()
setPreferredExecutor
public void setPreferredExecutor(String preferredExecutor)
toString
public String toString()
- Overrides:
toString in class Task
Copyright © 2009. All Rights Reserved.