Class CombinedTaskScheduler
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.core.schedulers.CombinedTaskScheduler
-
- All Implemented Interfaces:
TaskScheduler
,Runnable
public class CombinedTaskScheduler extends Object implements TaskScheduler, Runnable
This class defined a combined task scheduler that use several context schedulers according to the parallelization mode of the step.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description CombinedTaskScheduler(int threadNumber)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StepResult
getResult(Step step)
Get the result related to a step.StepStatus
getStatus(Step step)
Get the status related to a step.int
getTaskDoneCount(Step step)
Get the count of done task contexts of a step.int
getTaskRunningCount(Step step)
Get the count of running task contexts of a step.int
getTaskSubmittedCount(Step step)
Get the count of submitted task contexts of a step.int
getTotalTaskDoneCount()
Get the count of done task contexts for the workflow.int
getTotalTaskRunningCount()
Get the count of running task contexts for the workflow.int
getTotalTaskSubmittedCount()
Get the count of submitted task contexts for the workflow.void
run()
void
start()
Start the scheduler.void
stop()
Stop the scheduler.void
submit(Step step, TaskContextImpl context)
Submit a context to execute.void
submit(Step step, Set<TaskContextImpl> contexts)
Submit contexts to execute.void
waitEndOfTasks(Step step)
Wait the end of the task contexts.
-
-
-
Method Detail
-
submit
public void submit(Step step, Set<TaskContextImpl> contexts)
Description copied from interface:TaskScheduler
Submit contexts to execute.- Specified by:
submit
in interfaceTaskScheduler
- Parameters:
step
- step related to the contextscontexts
- contexts to execute
-
submit
public void submit(Step step, TaskContextImpl context)
Description copied from interface:TaskScheduler
Submit a context to execute.- Specified by:
submit
in interfaceTaskScheduler
- Parameters:
step
- step related to the contextcontext
- context to execute
-
getStatus
public StepStatus getStatus(Step step)
Description copied from interface:TaskScheduler
Get the status related to a step.- Specified by:
getStatus
in interfaceTaskScheduler
- Parameters:
step
- a workflow step- Returns:
- the step status object related to the step
-
getResult
public StepResult getResult(Step step)
Description copied from interface:TaskScheduler
Get the result related to a step.- Specified by:
getResult
in interfaceTaskScheduler
- Parameters:
step
- a workflow step- Returns:
- the step result object related to the step
-
getTaskSubmittedCount
public int getTaskSubmittedCount(Step step)
Description copied from interface:TaskScheduler
Get the count of submitted task contexts of a step.- Specified by:
getTaskSubmittedCount
in interfaceTaskScheduler
- Parameters:
step
- a workflow step- Returns:
- the count of submitted task contexts
-
getTaskRunningCount
public int getTaskRunningCount(Step step)
Description copied from interface:TaskScheduler
Get the count of running task contexts of a step.- Specified by:
getTaskRunningCount
in interfaceTaskScheduler
- Parameters:
step
- a workflow step- Returns:
- the count of running task contexts
-
getTaskDoneCount
public int getTaskDoneCount(Step step)
Description copied from interface:TaskScheduler
Get the count of done task contexts of a step.- Specified by:
getTaskDoneCount
in interfaceTaskScheduler
- Parameters:
step
- a workflow step- Returns:
- the count of done task contexts
-
waitEndOfTasks
public void waitEndOfTasks(Step step)
Description copied from interface:TaskScheduler
Wait the end of the task contexts.- Specified by:
waitEndOfTasks
in interfaceTaskScheduler
- Parameters:
step
- a workflow step
-
getTotalTaskSubmittedCount
public int getTotalTaskSubmittedCount()
Description copied from interface:TaskScheduler
Get the count of submitted task contexts for the workflow.- Specified by:
getTotalTaskSubmittedCount
in interfaceTaskScheduler
- Returns:
- the count of submitted task contexts
-
getTotalTaskRunningCount
public int getTotalTaskRunningCount()
Description copied from interface:TaskScheduler
Get the count of running task contexts for the workflow.- Specified by:
getTotalTaskRunningCount
in interfaceTaskScheduler
- Returns:
- the count of running task contexts
-
getTotalTaskDoneCount
public int getTotalTaskDoneCount()
Description copied from interface:TaskScheduler
Get the count of done task contexts for the workflow.- Specified by:
getTotalTaskDoneCount
in interfaceTaskScheduler
- Returns:
- the count of done task contexts
-
start
public void start()
Description copied from interface:TaskScheduler
Start the scheduler.- Specified by:
start
in interfaceTaskScheduler
-
stop
public void stop()
Description copied from interface:TaskScheduler
Stop the scheduler.- Specified by:
stop
in interfaceTaskScheduler
-
-