Class SpscOneQueue<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    io.reactivex.rxjava3.internal.fuseable.SimplePlainQueue<T>, io.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>, java.io.Serializable

    public final class SpscOneQueue<T>
    extends java.util.concurrent.atomic.AtomicReference<T>
    implements io.reactivex.rxjava3.internal.fuseable.SimplePlainQueue<T>
    A single-producer single-consumer queue with exactly one slot of value.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SpscOneQueue()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      boolean isEmpty()  
      boolean offer​(T value)  
      boolean offer​(T v1, T v2)  
      T poll()  
      • 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

      • SpscOneQueue

        public SpscOneQueue()
    • Method Detail

      • offer

        public boolean offer​(T value)
        Specified by:
        offer in interface io.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>
      • offer

        public boolean offer​(T v1,
                             T v2)
        Specified by:
        offer in interface io.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface io.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>
      • clear

        public void clear()
        Specified by:
        clear in interface io.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>
      • poll

        public T poll()
        Specified by:
        poll in interface io.reactivex.rxjava3.internal.fuseable.SimplePlainQueue<T>
        Specified by:
        poll in interface io.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>