Interface WorkflowCancellation.Request

All Superinterfaces:
WorkflowCancellation
Enclosing interface:
WorkflowCancellation

public static interface WorkflowCancellation.Request extends WorkflowCancellation
Provides pending workflow-cancellation requests to the workflow driver.

The cancellation coordinator owns this state. The workflow driver only consumes it after being woken so that it can publish the terminal event on its single control thread.

  • Method Details

    • hasPendingWorkflowCancellation

      boolean hasPendingWorkflowCancellation()
      Returns whether a workflow cancellation request is waiting for the workflow driver.
      Returns:
      true when a cancellation request is pending, otherwise false
    • consumeWorkflowCancellation

      @Nullable WorkflowCancellation.PendingRequest consumeWorkflowCancellation()
      Returns and marks the pending workflow cancellation request as consumed.
      Returns:
      the pending cancellation request, or null when no request is pending
    • abortPendingWorkflowCancellation

      void abortPendingWorkflowCancellation(CancellationException reason)
      Aborts an unconsumed workflow cancellation request because its workflow execution is no longer live.
      Parameters:
      reason - reason the cancellation can no longer be performed