Interface CancellableTask


public interface CancellableTask
Represents a task that can be cancelled.

This interface abstracts the underlying scheduler implementation, providing a platform-agnostic way to manage scheduled tasks.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels this task, preventing it from running again.
    boolean
    Checks if this task has been cancelled.
  • Method Details

    • cancel

      void cancel()
      Cancels this task, preventing it from running again.
    • isCancelled

      boolean isCancelled()
      Checks if this task has been cancelled.
      Returns:
      true if the task was cancelled, false otherwise