public abstract class ConcurrentSequencedCircularArrayQueue<E> extends ConcurrentCircularArrayQueue<E>
| Modifier and Type | Field and Description |
|---|---|
protected long[] |
sequenceBuffer
|
buffer, BUFFER_PAD, capacity, mask, SPARSE_SHIFT| Constructor and Description |
|---|
ConcurrentSequencedCircularArrayQueue(int capacity)
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
calcSequenceOffset(long index)
|
boolean |
isEmpty()
This method's accuracy is subject to concurrent modifications happening as the observation is carried out.
|
protected long |
lvSequence(long[] buffer, long offset)
|
boolean |
offer(M message)
Called from a producer thread subject to the restrictions appropriate to the implementation and according to the
Queue interface (but failure to offer doesn't necessitate queue is full).
|
M |
peek()
Called from the consumer thread subject to the restrictions appropriate to the implementation and according to the
Queue interface (barring the hard requirement on null returns).
|
M |
poll()
Called from the consumer thread subject to the restrictions appropriate to the implementation and according to the
Queue interface (barring the hard requirement on null returns).
|
int |
size()
This method's accuracy is subject to concurrent modifications happening as the size is estimated and as such is a best effort rather than absolute value.
|
protected void |
soSequence(long[] buffer, long offset, long e)
|
calcElementOffset, iterator, lpElement, lpElement, lvElement, lvElement, soElement, soElement, spElement, spElementcontains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArraypublic ConcurrentSequencedCircularArrayQueue(int capacity)
protected final long calcSequenceOffset(long index)
protected final void soSequence(long[] buffer,
long offset,
long e)protected final long lvSequence(long[] buffer,
long offset)public boolean offer(M message)
Queue.offer(Object) interface (but failure to offer doesn't necessitate queue is full).
message -
public M poll()
Queue.poll() interface (barring the hard requirement on null returns).
public M peek()
Queue.peek() interface (barring the hard requirement on null returns).
public int size()
Integer.MAX_VALUE if not bounded
public boolean isEmpty()