Interface Instruction


public interface Instruction
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Instruction executors are required to call this method prior to starting executing on the instruction.
    void
    Instruction executors are required to call this method when execution has finished to provide the execution result to the end.
    boolean
    Instruction executors can inform about execution hold ups which prevent an otherwise-ready instruction from executing by calling this method.
  • Method Details

    • checkedExecutionStart

      boolean checkedExecutionStart()
      Instruction executors are required to call this method prior to starting executing on the instruction. Implementations of this method are required to transition into Executing state and return true, or into Cancelled state and return false.
      Returns:
      Indication whether the instruction execution should proceed.
    • executionHeldUp

      boolean executionHeldUp(Details details)
      Instruction executors can inform about execution hold ups which prevent an otherwise-ready instruction from executing by calling this method. It is recommended they check the return of this method to detect if a cancellation occurred asynchronously.
      Parameters:
      details - Details which execution is held up
      Returns:
      Indication whether the instruction execution should proceed. If this method returns false, all subsequent calls to this method as well as checkedExecutionStart() will return false.
    • executionCompleted

      void executionCompleted(InstructionStatus status, Details details)
      Instruction executors are required to call this method when execution has finished to provide the execution result to the end.
      Parameters:
      status - Execution result
      details - Execution result details