Package org.apache.pekko.actor
Class Scheduler.AtomicCancellable
java.lang.Object
java.util.concurrent.atomic.AtomicReference<Cancellable>
org.apache.pekko.actor.Scheduler.AtomicCancellable
- All Implemented Interfaces:
Serializable,Cancellable
- Enclosing interface:
- Scheduler
public abstract static class Scheduler.AtomicCancellable
extends AtomicReference<Cancellable>
implements Cancellable
INTERNAL API
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleancancel()Cancels this Cancellable and returns true if that was successful.final booleanReturns true if and only if this Cancellable has been successfully cancelledprotected abstract Cancellableprotected final voidswap(Cancellable c) Methods inherited from class java.util.concurrent.atomic.AtomicReference
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
Constructor Details
-
AtomicCancellable
-
-
Method Details
-
cancel
public final boolean cancel()Description copied from interface:CancellableCancels 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
- Specified by:
cancelin interfaceCancellable
-
isCancelled
public final boolean isCancelled()Description copied from interface:CancellableReturns true if and only if this Cancellable has been successfully cancelledJava & Scala API
- Specified by:
isCancelledin interfaceCancellable
-
scheduledFirst
-
swap
-