类 DynamicForkWorker
- java.lang.Object
-
- cn.feiliu.taskflow.sdk.workflow.executor.task.DynamicForkWorker
-
-
构造器概要
构造器 构造器 说明 DynamicForkWorker(String name, Function<Object,DynamicForkInput> workerMethod, int pollingInterval)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 TaskExecResultexecute(ExecutingTask task)Executes a task and returns the updated task.intgetPollingInterval()Override this method to change the interval between polls.StringgetTaskDefName()Retrieve the name of the task definition the worker is currently working on.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 cn.feiliu.taskflow.sdk.worker.Worker
getBatchPollTimeoutInMS, getIdentity, leaseExtendEnabled, onErrorUpdate, paused
-
-
-
-
构造器详细资料
-
DynamicForkWorker
public DynamicForkWorker(String name, Function<Object,DynamicForkInput> workerMethod, int pollingInterval)
-
-
方法详细资料
-
getTaskDefName
public String getTaskDefName()
从接口复制的说明:WorkerRetrieve the name of the task definition the worker is currently working on.- 指定者:
getTaskDefName在接口中Worker- 返回:
- the name of the task definition.
-
execute
public TaskExecResult execute(ExecutingTask task) throws Throwable
从接口复制的说明:WorkerExecutes a task and returns the updated task.- 指定者:
execute在接口中Worker- 参数:
task- Task to be executed.- 返回:
- the
TaskExecResultobject If the task is not completed yet, return with the status as IN_PROGRESS. - 抛出:
Throwable
-
getPollingInterval
public int getPollingInterval()
从接口复制的说明:WorkerOverride this method to change the interval between polls.- 指定者:
getPollingInterval在接口中Worker- 返回:
- interval in millisecond at which the server should be polled for worker tasks.
-
-