org.opennms.netmgt.provision.service.tasks
Class SyncTask

java.lang.Object
  extended by org.opennms.netmgt.provision.service.tasks.Task
      extended by org.opennms.netmgt.provision.service.tasks.SyncTask

public class SyncTask
extends Task

SyncTask

Author:
brozow

Field Summary
static String ADMIN_EXECUTOR
           
static String DEFAULT_EXECUTOR
           
 
Constructor Summary
SyncTask(DefaultTaskCoordinator coordinator, ContainerTask parent, Runnable action)
           
SyncTask(DefaultTaskCoordinator coordinator, ContainerTask parent, Runnable action, String preferredExecutor)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

SyncTask

public SyncTask(DefaultTaskCoordinator coordinator,
                ContainerTask parent,
                Runnable action)

SyncTask

public SyncTask(DefaultTaskCoordinator coordinator,
                ContainerTask parent,
                Runnable action,
                String preferredExecutor)
Method Detail

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.