Additional top-level class in compilation unit: ConcurrentCircularArrayQueueL0Pad.
Modifier and Type | Class and Description |
---|---|
private static class |
Modifier and Type | Field and Description |
---|---|
protected final E[] | |
protected final long |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public int | |
public void | clear()
Overrides java. Implements io. |
public long | currentConsumerIndex()
Implements io. |
public long | currentProducerIndex()
Implements io. |
public boolean | isEmpty()
Overrides java. Implements io. |
public Iterator | Returns: The iterator.Implements abstract java. Implements java. |
public int | size()
Implements abstract java. Implements io. |
public String | toString()
Overrides java. |
buffer | back to summary |
---|---|
protected final E[] buffer |
mask | back to summary |
---|---|
protected final long mask |
ConcurrentCircularArrayQueue | back to summary |
---|---|
pack-priv ConcurrentCircularArrayQueue(int capacity) |
capacity | back to summary |
---|---|
public int capacity() Implements io.
|
clear | back to summary |
---|---|
public void clear() Overrides java. Implements io. Doc from io. Removes all items from the queue. Called from the consumer thread subject to the restrictions
appropriate to the implementation and according to the
|
currentConsumerIndex | back to summary |
---|---|
public long currentConsumerIndex() Implements io. Doc from io. This method has no concurrent visibility semantics. The value returned may be negative. Under normal
circumstances 2 consecutive calls to this method can offer an idea of progress made by consumer threads
by subtracting the 2 results though in extreme cases (if consumers have progressed by more than 2^64)
this may also fail.
|
currentProducerIndex | back to summary |
---|---|
public long currentProducerIndex() Implements io. Doc from io. This method has no concurrent visibility semantics. The value returned may be negative. Under normal
circumstances 2 consecutive calls to this method can offer an idea of progress made by producer threads
by subtracting the 2 results though in extreme cases (if producers have progressed by more than 2^64)
this may also fail.
|
isEmpty | back to summary |
---|---|
public boolean isEmpty() Overrides java. Implements io. Doc from io. This method's accuracy is subject to concurrent modifications happening as the observation is carried out.
|
iterator | back to summary |
---|---|
public Iterator Implements abstract java. Implements java. Get an iterator for this queue. This method is thread safe. The iterator provides a best-effort snapshot of the elements in the queue. The returned iterator is not guaranteed to return elements in queue order, and races with the consumer thread may cause gaps in the sequence of returned elements. Like {link #relaxedPoll}, the iterator may not immediately return newly inserted elements. |
size | back to summary |
---|---|
public int size() Implements abstract java. Implements io. Doc from io. 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. For some implementations this method may be O(n) rather than O(1).
|
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of this collection. The string
representation consists of a list of the collection's elements in the
order they are returned by its iterator, enclosed in square brackets
( |
Modifier and Type | Field and Description |
---|---|
private final E[] | |
private final long | |
private E | |
private long | |
private final long |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
private E | |
public boolean | |
public E | |
public void | remove()
Overrides default java. |
buffer | back to summary |
---|---|
private final E[] buffer |
mask | back to summary |
---|---|
private final long mask |
nextElement | back to summary |
---|---|
private E nextElement |
nextIndex | back to summary |
---|---|
private long nextIndex |
pIndex | back to summary |
---|---|
private final long pIndex |
WeakIterator | back to summary |
---|---|
pack-priv WeakIterator(long cIndex, long pIndex, long mask, E[] buffer) |
getNext | back to summary |
---|---|
private E getNext() |
hasNext | back to summary |
---|---|
public boolean hasNext() Implements java. Doc from java. Returns
|
next | back to summary |
---|---|
public E next() Implements java. Doc from java. Returns the next element in the iteration.
|
remove | back to summary |
---|---|
public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
|