edu.mssm.crover.ims.tasks.groups
Class RobustParallelTask

java.lang.Object
  |
  +--edu.mssm.crover.ims.tasks.Task
        |
        +--edu.mssm.crover.ims.tasks.groups.GroupOfTasks
              |
              +--edu.mssm.crover.ims.tasks.groups.RobustParallelTask
All Implemented Interfaces:
TaskControl, TaskListener

public class RobustParallelTask
extends GroupOfTasks

A group of tasks to be executed in parallel. In contrast to ParallelTask, RobustParallelTask does not give up if a few of its tasks fail. In this case, it follows the following strategy: 1/ splits the data of failed tasks and submit new tasks for each piece of splitted data.


Field Summary
 
Fields inherited from class edu.mssm.crover.ims.tasks.Task
data, priorTasks, status, taskID, taskType, tm
 
Constructor Summary
RobustParallelTask(TaskManager tm, long timeout)
           
 
Method Summary
 void add(Task new_task)
          Add a task to the parallel group.
 void allFinished()
          Does nothing.
 boolean isReadyToStart()
          Returns whether the task is ready to start.
 void statusChanged(java.lang.String taskid, TaskStatus newstatus)
          The status of a task has just changed.
 
Methods inherited from class edu.mssm.crover.ims.tasks.Task
abnormalTermination, addListener, addPriorTask, getData, getPriorTasks, getStatus, getTaskID, getTaskType, getTimeout, installEngine, normalTermination, notifyListeners, priorTasksDone, process, removeListener, removePriorTask, setData, setTaskID, setTaskType, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RobustParallelTask

public RobustParallelTask(TaskManager tm,
                          long timeout)
Method Detail

add

public void add(Task new_task)
Add a task to the parallel group.

Specified by:
add in class GroupOfTasks

statusChanged

public void statusChanged(java.lang.String taskid,
                          TaskStatus newstatus)
The status of a task has just changed. We are notified of the new status and the identity of the task that experienced the change.

Specified by:
statusChanged in interface TaskListener
Overrides:
statusChanged in class Task
See Also:
TaskListener.statusChanged(String, TaskStatus)

allFinished

public void allFinished()
Does nothing.

Specified by:
allFinished in class GroupOfTasks

isReadyToStart

public boolean isReadyToStart()
Returns whether the task is ready to start. Overwriten to request success of each prior task. Also checks the value of stop_robust. When this bool is true, allow the task to start.

Overrides:
isReadyToStart in class Task


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.