com.massimo.tools.scriptrunner.control
Class ParallelTask
java.lang.Object
   com.massimo.tools.scriptrunner.AbstractTask
com.massimo.tools.scriptrunner.AbstractTask
       com.massimo.tools.scriptrunner.control.AbstractCompoundTask
com.massimo.tools.scriptrunner.control.AbstractCompoundTask
           com.massimo.tools.scriptrunner.control.ParallelTask
com.massimo.tools.scriptrunner.control.ParallelTask
- All Implemented Interfaces: 
- Task
- public class ParallelTask 
- extends AbstractCompoundTask
This will run all child Tasks in separate Threads.
 
 
 
 
 
 
| Methods inherited from class com.massimo.tools.scriptrunner.AbstractTask | 
| getBooleanProperty, getCurrentWorkingDirectory, getDefinition, getIntProperty, getName, getParent, getProperties, getStartProcessingRow, getText, getType, isIgnoreableError, isIgnoreableError, isInterrupted, isLogProgress, postProcess, preProcess, process, resultCodeToString, substituteParameters, toString, validate, validateConnections, validateParameters | 
 
 
ParallelTask
public ParallelTask(Task parent,
                    String type,
                    Element definition,
                    Map<String,String> parentConnectionProperties)
- Parameters:
- parent-
- type-
- definition-
- parentConnectionProperties-
getLogger
protected org.apache.log4j.Logger getLogger()
- 
 
- 
- Specified by:
- getLoggerin class- AbstractTask
 
- 
- Returns:
- Class logger
 
processCompound
protected int processCompound(ExecutionContext context,
                              Elements tasks)
                       throws Exception
- Executes all child Tasks in separate threads.
 
 Waits for all threads to finish and returns success only if all succeed.
 
- 
- Specified by:
- processCompoundin class- AbstractCompoundTask
 
- 
- Parameters:
- context-
- tasks- A list of Task definition Elements
- Returns:
- The result of running all tasks
- Throws:
- Exception