Class TestTaskProcessor

java.lang.Object
com._1c.g5.v8.internal.derived.scheduler.TestTaskProcessor
All Implemented Interfaces:
ITaskProcessor, Callable<Void>

public class TestTaskProcessor extends Object implements ITaskProcessor
Test task callable to test the pool functions
  • Constructor Details

  • Method Details

    • call

      public Void call() throws Exception
      Specified by:
      call in interface Callable<Void>
      Throws:
      Exception
    • cancel

      public void cancel()
      Description copied from interface: ITaskProcessor
      Marks the task being processed by this processor as cancelled.
      Specified by:
      cancel in interface ITaskProcessor
    • getComputationTask

      public DerivedDataComputationTask getComputationTask()
    • getException

      public Throwable getException()
    • isCalled

      public boolean isCalled()
    • isCancelled

      public boolean isCancelled()
    • isPriorityTask

      public boolean isPriorityTask()
      Description copied from interface: ITaskProcessor
      Checks if the task that will be/being performed by this processor is a priority one
      Specified by:
      isPriorityTask in interface ITaskProcessor
      Returns:
      True if the executed task is a priority task
    • getTaskName

      public String getTaskName()
      Description copied from interface: ITaskProcessor
      Gets the name of the task
      Specified by:
      getTaskName in interface ITaskProcessor
      Returns:
      The name of the task. May not be null
    • isCancelled

      public boolean isCancelled(Object cancelRequestHandle)
      Description copied from interface: ITaskProcessor
      Checks if the task is cancelled
      Specified by:
      isCancelled in interface ITaskProcessor
      Parameters:
      cancelRequestHandle - The handle of the cancel request. May not be null
      Returns:
      True if the task is cancelled
    • dumpCurrentProcess

      public void dumpCurrentProcess()
      Description copied from interface: ITaskProcessor
      Dumps the stack of the current process. Used only for tracing/debugging
      Specified by:
      dumpCurrentProcess in interface ITaskProcessor
    • registerCancelRequest

      public void registerCancelRequest(Object cancelRequestHandle)
      Description copied from interface: ITaskProcessor
      Registers a cancel request
      Specified by:
      registerCancelRequest in interface ITaskProcessor
      Parameters:
      cancelRequestHandle - The handle of a cancel request. May not be null
    • setFuture

      public void setFuture(CompletableFuture<Void> future)
      Description copied from interface: ITaskProcessor
      Sets the future of a launched task
      Specified by:
      setFuture in interface ITaskProcessor
      Parameters:
      future - The task to set. May not be null
    • getTargetStage

      public DerivedDataSegmentBucket getTargetStage()
      Description copied from interface: ITaskProcessor
      Task target stage of an async. pipeline
      Specified by:
      getTargetStage in interface ITaskProcessor
      Returns:
      The target stage of a task being procesed within this processor. May not be null