Class CombinedTaskScheduler
java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.schedulers.CombinedTaskScheduler
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionGet the result related to a step.Get the status related to a step.intgetTaskDoneCount(Step step) Get the count of done task contexts of a step.intgetTaskRunningCount(Step step) Get the count of running task contexts of a step.intgetTaskSubmittedCount(Step step) Get the count of submitted task contexts of a step.intGet the count of done task contexts for the workflow.intGet the count of running task contexts for the workflow.intGet the count of submitted task contexts for the workflow.voidrun()voidstart()Start the scheduler.voidstop()Stop the scheduler.voidsubmit(Step step, TaskContextImpl context) Submit a context to execute.voidsubmit(Step step, Set<TaskContextImpl> contexts) Submit contexts to execute.voidwaitEndOfTasks(Step step) Wait the end of the task contexts.
-
Constructor Details
-
CombinedTaskScheduler
public CombinedTaskScheduler(int threadNumber) Constructor.- Parameters:
threadNumber- number of thread to use by the task scheduler
-
-
Method Details
-
submit
Description copied from interface:TaskSchedulerSubmit contexts to execute.- Specified by:
submitin interfaceTaskScheduler- Parameters:
step- step related to the contextscontexts- contexts to execute
-
submit
Description copied from interface:TaskSchedulerSubmit a context to execute.- Specified by:
submitin interfaceTaskScheduler- Parameters:
step- step related to the contextcontext- context to execute
-
getStatus
Description copied from interface:TaskSchedulerGet the status related to a step.- Specified by:
getStatusin interfaceTaskScheduler- Parameters:
step- a workflow step- Returns:
- the step status object related to the step
-
getResult
Description copied from interface:TaskSchedulerGet the result related to a step.- Specified by:
getResultin interfaceTaskScheduler- Parameters:
step- a workflow step- Returns:
- the step result object related to the step
-
getTaskSubmittedCount
Description copied from interface:TaskSchedulerGet the count of submitted task contexts of a step.- Specified by:
getTaskSubmittedCountin interfaceTaskScheduler- Parameters:
step- a workflow step- Returns:
- the count of submitted task contexts
-
getTaskRunningCount
Description copied from interface:TaskSchedulerGet the count of running task contexts of a step.- Specified by:
getTaskRunningCountin interfaceTaskScheduler- Parameters:
step- a workflow step- Returns:
- the count of running task contexts
-
getTaskDoneCount
Description copied from interface:TaskSchedulerGet the count of done task contexts of a step.- Specified by:
getTaskDoneCountin interfaceTaskScheduler- Parameters:
step- a workflow step- Returns:
- the count of done task contexts
-
waitEndOfTasks
Description copied from interface:TaskSchedulerWait the end of the task contexts.- Specified by:
waitEndOfTasksin interfaceTaskScheduler- Parameters:
step- a workflow step
-
getTotalTaskSubmittedCount
public int getTotalTaskSubmittedCount()Description copied from interface:TaskSchedulerGet the count of submitted task contexts for the workflow.- Specified by:
getTotalTaskSubmittedCountin interfaceTaskScheduler- Returns:
- the count of submitted task contexts
-
getTotalTaskRunningCount
public int getTotalTaskRunningCount()Description copied from interface:TaskSchedulerGet the count of running task contexts for the workflow.- Specified by:
getTotalTaskRunningCountin interfaceTaskScheduler- Returns:
- the count of running task contexts
-
getTotalTaskDoneCount
public int getTotalTaskDoneCount()Description copied from interface:TaskSchedulerGet the count of done task contexts for the workflow.- Specified by:
getTotalTaskDoneCountin interfaceTaskScheduler- Returns:
- the count of done task contexts
-
start
public void start()Description copied from interface:TaskSchedulerStart the scheduler.- Specified by:
startin interfaceTaskScheduler
-
stop
public void stop()Description copied from interface:TaskSchedulerStop the scheduler.- Specified by:
stopin interfaceTaskScheduler
-
run
public void run()
-