Package hu.akarnokd.rxjava3.util
Class SpscOneQueue<T>
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicReference<T>
-
- hu.akarnokd.rxjava3.util.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 voidclear()booleanisEmpty()booleanoffer(T value)booleanoffer(T v1, T v2)Tpoll()-
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
-
-
-
-
Method Detail
-
offer
public boolean offer(T value)
- Specified by:
offerin interfaceio.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>
-
offer
public boolean offer(T v1, T v2)
- Specified by:
offerin interfaceio.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceio.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>
-
clear
public void clear()
- Specified by:
clearin interfaceio.reactivex.rxjava3.internal.fuseable.SimpleQueue<T>
-
-