Interface StreamTaskCancellationContext

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Internal public interface StreamTaskCancellationContext
Context on the StreamTask for figuring out whether it has been cancelled.
  • Method Details

    • alwaysRunning

      static StreamTaskCancellationContext alwaysRunning()
      Factory for a context that always returns false when isCancelled() is called.
      Returns:
      context
    • isCancelled

      boolean isCancelled()
      Find out whether the StreamTask this context belongs to has been cancelled.
      Returns:
      true if the StreamTask the has been cancelled