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 Details

    • AtomicCancellable

      public AtomicCancellable(Cancellable initialValue)
  • Method Details

    • 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 interface Cancellable
    • isCancelled

      public final boolean isCancelled()
      Description copied from interface: Cancellable
      Returns true if and only if this Cancellable has been successfully cancelled

      Java & Scala API

      Specified by:
      isCancelled in interface Cancellable
    • scheduledFirst

      protected abstract Cancellable scheduledFirst()
    • swap

      protected final void swap(Cancellable c)