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:
java.io.Serializable
,Cancellable
- Enclosing interface:
- Scheduler
public abstract static class Scheduler.AtomicCancellable extends java.util.concurrent.atomic.AtomicReference<Cancellable> implements Cancellable
INTERNAL API- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AtomicCancellable(Cancellable initialValue)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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 cancelledprotected abstract Cancellable
scheduledFirst()
protected void
swap(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 Detail
-
AtomicCancellable
public AtomicCancellable(Cancellable initialValue)
-
-
Method Detail
-
cancel
public final boolean cancel()
Description copied from interface:Cancellable
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
- Specified by:
cancel
in interfaceCancellable
-
isCancelled
public final boolean isCancelled()
Description copied from interface:Cancellable
Returns true if and only if this Cancellable has been successfully cancelledJava & Scala API
- Specified by:
isCancelled
in interfaceCancellable
-
scheduledFirst
protected abstract Cancellable scheduledFirst()
-
swap
protected final void swap(Cancellable c)
-
-