Additional top-level class in compilation unit: ConcurrentCircularArrayQueueL0Pad.
Offset calculation is separate from access to enable the reuse of a give compute offset.
Load/Store methods using a buffer parameter are provided to allow the prevention of final field reload after a LoadLoad barrier.
| Modifier and Type | Field and Description |
|---|---|
| protected final E[] | |
| protected static final int | |
| protected final long | |
| private static final long | |
| private static final int | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final long | Returns: the offset in bytes within the array for a given index.desirable element index index)
|
| protected final long | Returns: the offset in bytes within the array for a given index.desirable element index index, long the binary mask to make the index wrap around mask)
|
| public void | clear()
Overrides java. Implements java. |
| public Iterator | iterator()
Implements abstract java. Implements java. |
| protected final E | Returns: the element at the offsetcomputed via offset)ConcurrentCircularArrayQueue#calcElementOffset(long)A plain load (no ordering/fences) of an element from a given offset. |
| protected final E | Returns: the element at the offsetthis.buffer buffer, long computed via offset)ConcurrentCircularArrayQueue#calcElementOffset(long)A plain load (no ordering/fences) of an element from a given offset. |
| protected final E | Returns: the element at the offsetcomputed via offset)ConcurrentCircularArrayQueue#calcElementOffset(long)A volatile load (load + LoadLoad barrier) of an element from a given offset. |
| protected final E | Returns: the element at the offsetthis.buffer buffer, long computed via offset)ConcurrentCircularArrayQueue#calcElementOffset(long)A volatile load (load + LoadLoad barrier) of an element from a given offset. |
| protected final void | soElement(long
computed via offset, E ConcurrentCircularArrayQueue#calcElementOffset(long)an orderly kitty e)An ordered store(store + StoreStore barrier) of an element to a given offset |
| protected final void | soElement(E[]
this.buffer buffer, long computed via offset, E ConcurrentCircularArrayQueue#calcElementOffset(long)an orderly kitty e)An ordered store(store + StoreStore barrier) of an element to a given offset |
| protected final void | spElement(long
computed via offset, E ConcurrentCircularArrayQueue#calcElementOffset(long)a kitty e)A plain store (no ordering/fences) of an element to a given offset |
| protected final void | spElement(E[]
this.buffer buffer, long computed via offset, E ConcurrentCircularArrayQueue#calcElementOffset(long)an orderly kitty e)A plain store (no ordering/fences) of an element to a given offset |
| buffer | back to summary |
|---|---|
| protected final E[] buffer | |
| BUFFER_PAD | back to summary |
|---|---|
| protected static final int BUFFER_PAD | |
| mask | back to summary |
|---|---|
| protected final long mask | |
| REF_ARRAY_BASE | back to summary |
|---|---|
| private static final long REF_ARRAY_BASE | |
| REF_ELEMENT_SHIFT | back to summary |
|---|---|
| private static final int REF_ELEMENT_SHIFT | |
| SPARSE_SHIFT | back to summary |
|---|---|
| protected static final int SPARSE_SHIFT | |
| ConcurrentCircularArrayQueue | back to summary |
|---|---|
public ConcurrentCircularArrayQueue(int capacity)
| |
| calcElementOffset | back to summary |
|---|---|
protected final long calcElementOffset(long index)
| |
| calcElementOffset | back to summary |
|---|---|
protected final long calcElementOffset(long index, long mask)
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Doc from java. Removes all of the elements from this queue. The queue will be empty after this call returns. This implementation repeatedly invokes
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned (unless this collection is an instance of some class that provides a guarantee). | |
| lpElement | back to summary |
|---|---|
| protected final E lpElement(long offset) A plain load (no ordering/fences) of an element from a given offset.
| |
| lpElement | back to summary |
|---|---|
| protected final E lpElement(E[] buffer, long offset) A plain load (no ordering/fences) of an element from a given offset.
| |
| lvElement | back to summary |
|---|---|
| protected final E lvElement(long offset) A volatile load (load + LoadLoad barrier) of an element from a given offset.
| |
| lvElement | back to summary |
|---|---|
| protected final E lvElement(E[] buffer, long offset) A volatile load (load + LoadLoad barrier) of an element from a given offset.
| |
| soElement | back to summary |
|---|---|
| protected final void soElement(long offset, E e) An ordered store(store + StoreStore barrier) of an element to a given offset
| |
| soElement | back to summary |
|---|---|
| protected final void soElement(E[] buffer, long offset, E e) An ordered store(store + StoreStore barrier) of an element to a given offset
| |
| spElement | back to summary |
|---|---|
| protected final void spElement(long offset, E e) A plain store (no ordering/fences) of an element to a given offset
| |
| spElement | back to summary |
|---|---|
| protected final void spElement(E[] buffer, long offset, E e) A plain store (no ordering/fences) of an element to a given offset
| |