Class Scheduler.AtomicCancellable

    • 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 cancelled
      protected 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 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()