Interface Pausable

All Known Implementing Classes:
Context

public interface Pausable
Implemented by objects that can be paused and resumed during transaction processing.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the configured pause timeout.
    Pauses execution and returns a Future that resolves to the resume result.
    void
    Resets the pause state so this object can be reused.
    void
    resume(int result)
    Resumes a paused execution with the given result code.
    void
    setTimeout(long timeoutInMillis)
    Sets the maximum pause duration.
  • Method Details

    • setTimeout

      void setTimeout(long timeoutInMillis)
      Sets the maximum pause duration.
      Parameters:
      timeoutInMillis - timeout in milliseconds
    • getTimeout

      long getTimeout()
      Returns the configured pause timeout.
      Returns:
      timeout in milliseconds
    • pause

      Pauses execution and returns a Future that resolves to the resume result.
      Returns:
      a Future resolving to the result code passed to resume(int)
    • resume

      void resume(int result)
      Resumes a paused execution with the given result code.
      Parameters:
      result - the result code to deliver to the waiting Future
    • reset

      void reset()
      Resets the pause state so this object can be reused.