Interface MaybeMergeArray.SimpleQueueWithConsumerIndex<T>
-
- All Superinterfaces:
SimpleQueue<T>
- All Known Implementing Classes:
MaybeMergeArray.ClqSimpleQueue
,MaybeMergeArray.MpscFillOnceSimpleQueue
- Enclosing class:
- MaybeMergeArray<T>
static interface MaybeMergeArray.SimpleQueueWithConsumerIndex<T> extends SimpleQueue<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
consumerIndex()
void
drop()
T
peek()
T
poll()
Tries to dequeue a value (non-null) or returns null if the queue is empty.int
producerIndex()
-
Methods inherited from interface io.reactivex.rxjava3.operators.SimpleQueue
clear, isEmpty, offer, offer
-
-
-
-
Method Detail
-
poll
@Nullable T poll()
Description copied from interface:SimpleQueue
Tries to dequeue a value (non-null) or returns null if the queue is empty.If the producer uses
SimpleQueue.offer(Object, Object)
and when polling in pairs, if the first poll() returns a non-null item, the second poll() is guaranteed to return a non-null item as well.- Specified by:
poll
in interfaceSimpleQueue<T>
- Returns:
- the item or null to indicate an empty queue
-
peek
T peek()
-
drop
void drop()
-
consumerIndex
int consumerIndex()
-
producerIndex
int producerIndex()
-
-