类 ForkJoin
- java.lang.Object
-
- cn.feiliu.taskflow.sdk.workflow.def.tasks.Task<ForkJoin>
-
- cn.feiliu.taskflow.sdk.workflow.def.tasks.ForkJoin
-
public class ForkJoin extends Task<ForkJoin>
ForkJoin task 数据定义示例:[ [task-1, task-2], [task-3, task-4], [task-5] ]执行示例:
----------------------------- | fork-join | ----------------------------- | | | task-1 task-3 task-5 | | | task-2 task-4 | | | | ----------------------------- | join | -----------------------------
- 从以下版本开始:
- 2024-09-08
- 作者:
- SHOUSHEN.LUAN
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected List<FlowTask>getChildrenTasks()Override this method when sub-classes will generate multiple workflow tasks.Task[][]getForkedTasks()ForkJoinjoinOn(String... joinOn)voidupdateWorkflowTask(FlowTask fork)Override this method when the sub-class should update the default WorkflowTask generated usingTask.toWorkflowTask()-
从类继承的方法 cn.feiliu.taskflow.sdk.workflow.def.tasks.Task
description, getDescription, getInput, getName, getParentTasks, getStartDelay, getTaskReferenceName, getType, getWorkflowDefTasks, input, input, input, input, input, input, input, input, input, input, isOptional, name, setName, setOptional, setStartDelay, setTaskReferenceName, toWorkflowTask
-
-
-
-
构造器详细资料
-
ForkJoin
public ForkJoin(String taskReferenceName, Task<?>[]... forkedTasks)
execute task specified in the forkedTasks parameter in parallel.forkedTask is a two-dimensional list that executes the outermost list in parallel and list within that is executed sequentially.
e.g. [[task1, task2],[task3, task4],[task5]] are executed as:
--------------- | fork | --------------- | | | | | | task1 task3 task5 task2 task4 | | | | --------------------- | join | ---------------------This method automatically adds a join that waits for all the *last* tasks in the fork (e.g. task2, task4 and task5 in the above example) to be completed.*
Use join method @see
joinOn(String...)to override this behavior (note: not a common scenario)- 参数:
taskReferenceName- unique task reference nameforkedTasks- List of tasks to be executed in parallel
-
-
方法详细资料
-
getChildrenTasks
protected List<FlowTask> getChildrenTasks()
从类复制的说明:TaskOverride this method when sub-classes will generate multiple workflow tasks. Used by tasks which have children tasks such as do_while, fork, etc.- 覆盖:
getChildrenTasks在类中Task<ForkJoin>- 返回:
-
updateWorkflowTask
public void updateWorkflowTask(FlowTask fork)
从类复制的说明:TaskOverride this method when the sub-class should update the default WorkflowTask generated usingTask.toWorkflowTask()- 覆盖:
updateWorkflowTask在类中Task<ForkJoin>
-
getForkedTasks
public Task[][] getForkedTasks()
-
-