Class AllocatedPersistentTask


  • public class AllocatedPersistentTask
    extends CancellableTask
    Represents a executor node operation that corresponds to a persistent task
    • Constructor Detail

      • AllocatedPersistentTask

        public AllocatedPersistentTask​(long id,
                                       java.lang.String type,
                                       java.lang.String action,
                                       java.lang.String description,
                                       TaskId parentTask,
                                       java.util.Map<java.lang.String,​java.lang.String> headers)
    • Method Detail

      • shouldCancelChildrenOnCancellation

        public boolean shouldCancelChildrenOnCancellation()
        Description copied from class: CancellableTask
        Returns true if this task can potentially have children that need to be cancelled when it parent is cancelled.
        Specified by:
        shouldCancelChildrenOnCancellation in class CancellableTask
      • cancelOnParentLeaving

        public final boolean cancelOnParentLeaving()
        Description copied from class: CancellableTask
        Returns true if this task should be automatically cancelled if the coordinating node that requested this task left the cluster.
        Overrides:
        cancelOnParentLeaving in class CancellableTask
      • getStatus

        public Task.Status getStatus()
        Description copied from class: Task
        Build a status for this task or null if this task doesn't have status. Since most tasks don't have status this defaults to returning null. While this can never perform IO it might be a costly operation, requiring collating lists of results, etc. So only use it if you need the value.
        Overrides:
        getStatus in class Task
      • getPersistentTaskId

        public java.lang.String getPersistentTaskId()
      • getFailure

        public java.lang.Exception getFailure()
      • getAllocationId

        public long getAllocationId()
      • isCompleted

        protected final boolean isCompleted()
      • markAsCompleted

        public void markAsCompleted()
      • markAsFailed

        public void markAsFailed​(java.lang.Exception e)