Class SpscExactAtomicArrayQueue<T>

java.lang.Object
java.util.concurrent.atomic.AtomicReferenceArray<T>
rx.internal.util.atomic.SpscExactAtomicArrayQueue<T>
Type Parameters:
T - the value type held by this queue
All Implemented Interfaces:
Serializable, Iterable<T>, Collection<T>, Queue<T>

public final class SpscExactAtomicArrayQueue<T> extends AtomicReferenceArray<T> implements Queue<T>
A single-producer single-consumer bounded queue with exact capacity tracking.

This means that a queue of 10 will allow exactly 10 offers, however, the underlying storage is still power-of-2.

The implementation uses field updaters and thus should be platform-safe.

See Also: