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.
| 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. |
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.
Returns true if this scheduled action has been cancelled.