Package: groovy.concurrent

## [Java] Interface Cancellable

-     public interface Cancellable

  A handle for a scheduled action that can be called off before it fires (or that can have its further firings suppressed, in the case of a recurring schedule).

  Returned by ActorContext.scheduleOnce and ActorContext.scheduleAtFixedRate.

  Since:
    6.0.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `cancel()` Attempts to cancel the scheduled action.
    `` | `public boolean` | `isCancelled()` Returns `true` if this scheduled action has been cancelled.

- - ### Method Detail

    - #### public boolean cancel()

      Attempts to cancel the scheduled action. Returns `true` if cancellation prevented at least one further firing, `false` if the action had already fired (one-shot), had already been cancelled, or could not be cancelled.

      Idempotent: calling `cancel()` repeatedly is safe.

    - #### public boolean isCancelled()

      Returns `true` if this scheduled action has been cancelled.