Package org.apache.pekko.actor
Interface Cancellable
-
- All Known Subinterfaces:
LightArrayRevolverScheduler.TimerTask
- All Known Implementing Classes:
LightArrayRevolverScheduler.TaskHolder
,Scheduler.AtomicCancellable
public interface Cancellable
Signifies something that can be cancelled There is no strict guarantee that the implementation is thread-safe, but it should be good practice to make it so.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
cancel()
Cancels this Cancellable and returns true if that was successful.boolean
isCancelled()
Returns true if and only if this Cancellable has been successfully cancelled
-
-
-
Method Detail
-
cancel
boolean cancel()
Cancels this Cancellable and returns true if that was successful. If this cancellable was (concurrently) cancelled already, then this method will return false although isCancelled will return true.Java & Scala API
-
isCancelled
boolean isCancelled()
Returns true if and only if this Cancellable has been successfully cancelledJava & Scala API
-
-