Top Fields Constructors Methods
rx.internal.util.atomic

pack-priv abstract Class AtomicReferenceArrayQueue<E>

extends AbstractQueue<E>
Class Inheritance
Known Direct Subclasses
rx.internal.util.atomic.SpscAtomicArrayQueue
Imports
java.util.*, java.util.concurrent.atomic.AtomicReferenceArray, rx.internal.util.unsafe.Pow2

Field Summary

Modifier and TypeField and Description
protected final AtomicReferenceArray<E>
protected final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final int
calcElementOffset(long index, int mask)

protected final int
calcElementOffset(long index)

public void
clear()

Overrides java.util.AbstractQueue.clear.

Implements java.util.Collection.clear.

Removes all of the elements from this queue.
public Iterator<E>
iterator()

Implements abstract java.util.AbstractCollection.iterator.

Implements java.util.Collection.iterator.

Returns an iterator over the elements in this collection.
protected final E
lpElement(AtomicReferenceArray<E> buffer, int offset)

protected final E
lpElement(int offset)

protected final E
lvElement(AtomicReferenceArray<E> buffer, int offset)

protected final E
lvElement(int offset)

protected final void
soElement(AtomicReferenceArray<E> buffer, int offset, E value)

protected final void
soElement(int offset, E value)

protected final void
spElement(AtomicReferenceArray<E> buffer, int offset, E value)

protected final void
spElement(int offset, E value)

protected final void
svElement(AtomicReferenceArray<E> buffer, int offset, E value)

Inherited from java.util.AbstractQueue:
addaddAllelementremove

Field Detail

bufferback to summary
protected final AtomicReferenceArray<E> buffer
maskback to summary
protected final int mask

Constructor Detail

AtomicReferenceArrayQueueback to summary
public AtomicReferenceArrayQueue(int capacity)

Method Detail

calcElementOffsetback to summary
protected final int calcElementOffset(long index, int mask)
calcElementOffsetback to summary
protected final int calcElementOffset(long index)
clearback to summary
public void clear()

Overrides java.util.AbstractQueue.clear.

Implements java.util.Collection.clear.

Doc from java.util.AbstractQueue.clear.

Removes all of the elements from this queue. The queue will be empty after this call returns.

This implementation repeatedly invokes poll until it returns null.

Annotations
@Override
iteratorback to summary
public Iterator<E> iterator()

Implements abstract java.util.AbstractCollection.iterator.

Implements java.util.Collection.iterator.

Doc from java.util.Collection.iterator.

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).

Returns:Iterator<E>

an Iterator over the elements in this collection

Annotations
@Override
lpElementback to summary
protected final E lpElement(AtomicReferenceArray<E> buffer, int offset)
lpElementback to summary
protected final E lpElement(int offset)
lvElementback to summary
protected final E lvElement(AtomicReferenceArray<E> buffer, int offset)
lvElementback to summary
protected final E lvElement(int offset)
soElementback to summary
protected final void soElement(AtomicReferenceArray<E> buffer, int offset, E value)
soElementback to summary
protected final void soElement(int offset, E value)
spElementback to summary
protected final void spElement(AtomicReferenceArray<E> buffer, int offset, E value)
spElementback to summary
protected final void spElement(int offset, E value)
svElementback to summary
protected final void svElement(AtomicReferenceArray<E> buffer, int offset, E value)