Interface ITaskProcessor

All Superinterfaces:
Callable<Void>
All Known Implementing Classes:
TestTaskProcessor

public interface ITaskProcessor extends Callable<Void>
Abstraction of the DD task processor. The object that implements this interface should be provided by the IDerivedDataTaskSupplier so the task being scheduled by the DerivedDataTaskScheduler could be executed
  • Method Details

    • cancel

      void cancel()
      Marks the task being processed by this processor as cancelled.
    • isPriorityTask

      boolean isPriorityTask()
      Checks if the task that will be/being performed by this processor is a priority one
      Returns:
      True if the executed task is a priority task
    • getTargetStage

      DerivedDataSegmentBucket getTargetStage()
      Task target stage of an async. pipeline
      Returns:
      The target stage of a task being procesed within this processor. May not be null
    • getTaskName

      String getTaskName()
      Gets the name of the task
      Returns:
      The name of the task. May not be null
    • isCancelled

      boolean isCancelled(Object cancelRequestHandle)
      Checks if the task is cancelled
      Parameters:
      cancelRequestHandle - The handle of the cancel request. May not be null
      Returns:
      True if the task is cancelled
    • dumpCurrentProcess

      void dumpCurrentProcess()
      Dumps the stack of the current process. Used only for tracing/debugging
    • registerCancelRequest

      void registerCancelRequest(Object cancelRequestHandle)
      Registers a cancel request
      Parameters:
      cancelRequestHandle - The handle of a cancel request. May not be null
    • setFuture

      void setFuture(CompletableFuture<Void> future)
      Sets the future of a launched task
      Parameters:
      future - The task to set. May not be null