planetj.dataengine.autorun
Class AutoRunManager

java.lang.Object
  |
  +--planetj.dataengine.autorun.AutoRunManager

public class AutoRunManager
extends Object

Manages operations which need to be run automatically. This class maintains a collection of timers which are used for scheduling auto-run operations.


Field Summary
static int AUTO_RUN_DEVELOPMENT_ENABLED
           
static int AUTO_RUN_DISABLED
           
static int AUTO_RUN_EMAIL_ENABLED
          Deprecated.  
static int AUTO_RUN_ENABLED
           
static int AUTO_RUN_PRODUCTION_ENABLED
           
 
Method Summary
 void cancelAllTasks(AutoRunOperation pOperation, boolean pPermanently)
          Cancels all of the operation's tasks.
 void cancelTask(AutoRunOperation pOperation, Operation pTargetOperation, boolean pPermanently)
          Cancels the task associated with the specified operations.
 void cancelTask(int pAutoRunId, int pTargetOperationId, boolean pPermanently)
          Cancels the task associated with the specified operations.
 void cancelTask(int pAutoRunId, Operation pTargetOperation, boolean pPermanently)
          Cancels the task associated with the specified operations.
 void initialize(String metadataAlias)
          Schedules all operation which are automatically run
 void rescheduleAllTasks(AutoRunOperation pOperation)
          Cancels all of the operation's tasks and then reschedules them.
 void rescheduleTask(AutoRunOperation pOperation, Operation pTargetOperation)
          Cancels the task associated with the specified operations, and the reschedules it.
 void schedule(AutoRunTask pTask)
          Schedules a task.
 void schedule(Operation o)
          Schedules an operation to be run automatically.
static AutoRunManager singleton()
          Gets the singleton instance of AutoRunManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTO_RUN_DISABLED

public static final int AUTO_RUN_DISABLED
See Also:
Constant Field Values

AUTO_RUN_ENABLED

public static final int AUTO_RUN_ENABLED
See Also:
Constant Field Values

AUTO_RUN_PRODUCTION_ENABLED

public static final int AUTO_RUN_PRODUCTION_ENABLED
See Also:
Constant Field Values

AUTO_RUN_DEVELOPMENT_ENABLED

public static final int AUTO_RUN_DEVELOPMENT_ENABLED
See Also:
Constant Field Values

AUTO_RUN_EMAIL_ENABLED

public static final int AUTO_RUN_EMAIL_ENABLED
Deprecated.  

See Also:
Constant Field Values
Method Detail

cancelAllTasks

public void cancelAllTasks(AutoRunOperation pOperation,
                           boolean pPermanently)
                    throws CMException
Cancels all of the operation's tasks. This method may be invoked by the DataEngine when an autorun operation is updated.

Parameters:
pOperation - The autorun operation whose tasks will be canceled
pPermanently - If the link between the autorun operation and all of its target operations should be severed
CMException

cancelTask

public void cancelTask(int pAutoRunId,
                       int pTargetOperationId,
                       boolean pPermanently)
                throws CMException
Cancels the task associated with the specified operations. This method may be invoked by the DataEngine when an operation is updated.

Parameters:
pAutoRunId - The id of the autorun operation whose task will be canceled
pPermanently - If the link between the autorun operation the target operation should be severed
CMException

cancelTask

public void cancelTask(int pAutoRunId,
                       Operation pTargetOperation,
                       boolean pPermanently)
                throws CMException
Cancels the task associated with the specified operations. This method may be invoked by the DataEngine when an operation is updated.

Parameters:
pAutoRunId - The id of the autorun operation whose task will be canceled
pTargetOperation - The target operation whose task will be canceled
pPermanently - If the link between the autorun operation the target operation should be severed
CMException

cancelTask

public void cancelTask(AutoRunOperation pOperation,
                       Operation pTargetOperation,
                       boolean pPermanently)
                throws CMException
Cancels the task associated with the specified operations. This method may be invoked by the DataEngine when an operation is updated.

Parameters:
pOperation - The autorun operation whose task will be canceled
pTargetOperation - The target operation whose task will be canceled
pPermanently - If the link between the autorun operation the target operation should be severed
CMException

initialize

public void initialize(String metadataAlias)
                throws CMException
Schedules all operation which are automatically run

CMException

rescheduleAllTasks

public void rescheduleAllTasks(AutoRunOperation pOperation)
                        throws CMException
Cancels all of the operation's tasks and then reschedules them. This method may be invoked by the DataEngine when an autorun operation is updated.

CMException

rescheduleTask

public void rescheduleTask(AutoRunOperation pOperation,
                           Operation pTargetOperation)
                    throws CMException
Cancels the task associated with the specified operations, and the reschedules it. This method may be invoked by the DataEngine when an operation is updated.

CMException

schedule

public void schedule(AutoRunTask pTask)
              throws CMException
Schedules a task. The task will execute at the time returned by its getStartTime() method. (If this time has already passed, the task will be executed immediately.) The task will then be executed repeatedly, at a frequency specified by its getFrequency() method.

CMException

schedule

public void schedule(Operation o)
              throws CMException
Schedules an operation to be run automatically.

CMException

singleton

public static AutoRunManager singleton()
Gets the singleton instance of AutoRunManager