Interface TaskHandler

    • Method Detail

      • heartbeat

        default Long heartbeat​(Task task)
      • refreshStatus

        default void refreshStatus​(Task task)
      • getDefaultChannel

        default String getDefaultChannel()
        Returns:
        Channel URI for tasks managed by this handler, if applicable.
      • getArchetypeOid

        @Nullable
        @Nullable String getArchetypeOid​(@Nullable
                                         @Nullable String handlerUri)
        TODO Decide on the fate of this method.
        Parameters:
        handlerUri - One the handler URIs supported by this handler.
        Returns:
        Archetype OID for tasks that are powered by this handler and have the specified handler URI.
      • 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