public interface Worker
| Modifier and Type | Method and Description |
|---|---|
static Worker |
create(java.lang.String taskType,
java.util.function.Function<com.netflix.conductor.common.metadata.tasks.Task,com.netflix.conductor.common.metadata.tasks.TaskResult> executor) |
com.netflix.conductor.common.metadata.tasks.TaskResult |
execute(com.netflix.conductor.common.metadata.tasks.Task task)
Executes a task and returns the updated task.
|
default java.lang.String |
getIdentity()
Override this method to app specific rules.
|
default int |
getLongPollTimeoutInMS()
Deprecated.
|
default int |
getPollCount()
Deprecated.
|
default int |
getPollingInterval()
Override this method to change the interval between polls.
|
java.lang.String |
getTaskDefName()
Retrieve the name of the task definition the worker is currently working on.
|
default void |
onErrorUpdate(com.netflix.conductor.common.metadata.tasks.Task task)
Called when the task coordinator fails to update the task to the server.
|
default boolean |
paused()
Override this method to pause the worker from polling.
|
default boolean |
preAck(com.netflix.conductor.common.metadata.tasks.Task task)
Deprecated.
|
java.lang.String getTaskDefName()
com.netflix.conductor.common.metadata.tasks.TaskResult execute(com.netflix.conductor.common.metadata.tasks.Task task)
task - Task to be executed.TaskResult object
If the task is not completed yet, return with the status as IN_PROGRESS.@Deprecated default boolean preAck(com.netflix.conductor.common.metadata.tasks.Task task)
default void onErrorUpdate(com.netflix.conductor.common.metadata.tasks.Task task)
task - Task which cannot be updated back to the server.default boolean paused()
default java.lang.String getIdentity()
@Deprecated default int getPollCount()
default int getPollingInterval()
@Deprecated default int getLongPollTimeoutInMS()
static Worker create(java.lang.String taskType, java.util.function.Function<com.netflix.conductor.common.metadata.tasks.Task,com.netflix.conductor.common.metadata.tasks.TaskResult> executor)