Package com.evolveum.midpoint.task.api
Interface TaskHandler
- All Known Implementing Classes:
ActivityBasedTaskHandler
public interface TaskHandler
- Author:
- Radovan Semancik
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
default @NotNull StatisticsCollectionStrategy
default Long
default void
onNodeDown
(@NotNull TaskType task, @NotNull OperationResult result) Should update the state of the task (or related tasks) when the node on which this task executed was found down.default void
onTaskStalled
(@NotNull RunningTask task, long stalledSince, @NotNull OperationResult result) Should update the state of the task when the task manager finds that the task is stalled, i.e.default void
refreshStatus
(Task task) run
(@NotNull RunningTask task) Executes a task handler.
-
Method Details
-
run
Executes a task handler. TODO better description- Throws:
TaskException
-
heartbeat
-
refreshStatus
-
getDefaultChannel
- Returns:
- Channel URI for tasks managed by this handler, if applicable.
-
getStatisticsCollectionStrategy
-
onNodeDown
default void onNodeDown(@NotNull @NotNull TaskType task, @NotNull @NotNull OperationResult result) throws CommonException Should update the state of the task (or related tasks) when the node on which this task executed was found down. Currently this means releasing buckets allocated to this task. In the future we plan to execute this method within a dynamic repo transaction.- Throws:
CommonException
-
onTaskStalled
default void onTaskStalled(@NotNull @NotNull RunningTask task, long stalledSince, @NotNull @NotNull OperationResult result) throws CommonException Should update the state of the task when the task manager finds that the task is stalled, i.e. did not update its progress for a given (long) time.- Throws:
CommonException
-