Interface Interruptible

All Known Subinterfaces:
SimpleActivity
All Known Implementing Classes:
WaitStep

public interface Interruptible
Supports optional execution interrupt for components in a workflow. For the most part, this is passive, and the component should routinely check for interruption status, if applicable.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Whether the system should call interrupt() on the target workflow execution thread.
    default boolean
    Whether the workflow execution has been interrupted.
  • Method Details

    • allowThreadInterrupt

      default boolean allowThreadInterrupt()
      Whether the system should call interrupt() on the target workflow execution thread. This will cause any blocking calls in activities to be interrupted. This includes any currently blocking Object.wait(), Thread.sleep(), or open socket connections. Allowing thread interrupts should be used with caution, as it can introduce unexpected InterruptedExceptions that you may not have accounted for.
      Returns:
      Whether the system should call interrupt() on the target workflow execution thread
    • isInterrupted

      default boolean isInterrupted()
      Whether the workflow execution has been interrupted. This is a hint to the activity that it should stop processing and return as soon as possible. It is optional for the activity to validate this, which means that during an interruption request (e.g. workflow pause), the activity may continue to completion before the workflow execution exits.
      Returns:
      Whether the workflow execution has been interrupted