public abstract class QueueRingBase<M> extends java.lang.Object implements QueueRing<M>
| Constructor and Description |
|---|
QueueRingBase() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(M value) |
boolean |
addAll(java.util.Collection<? extends M> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
int |
drainTo(java.util.Collection<? super M> c) |
int |
drainTo(java.util.Collection<? super M> collection,
int maxElements) |
M |
element() |
boolean |
isEmpty() |
java.util.Iterator<M> |
iterator() |
boolean |
offer(M value) |
boolean |
offer(M value,
long timeout,
java.util.concurrent.TimeUnit unit)
Offer a new message to the queue.
|
M |
peek() |
M |
poll() |
M |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
put(M value) |
int |
remainingCapacity() |
M |
remove() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
M |
take() |
java.lang.Object[] |
toArray() |
<X> X[] |
toArray(X[] a) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic boolean isEmpty()
isEmpty in interface java.util.Collection<M>public int size()
size in interface java.util.Collection<M>public int remainingCapacity()
remainingCapacity in interface java.util.concurrent.BlockingQueue<M>public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<M>public boolean offer(M value)
public boolean offer(M value, long timeout, java.util.concurrent.TimeUnit unit)
QueueRingwake() will be required because offer
does not automatically wake the consumerpublic void put(M value) throws java.lang.InterruptedException
put in interface java.util.concurrent.BlockingQueue<M>java.lang.InterruptedExceptionpublic boolean add(M value)
public boolean addAll(java.util.Collection<? extends M> c)
addAll in interface java.util.Collection<M>public M poll(long timeout, java.util.concurrent.TimeUnit unit)
poll in interface java.util.concurrent.BlockingQueue<M>public int drainTo(java.util.Collection<? super M> c)
drainTo in interface java.util.concurrent.BlockingQueue<M>public int drainTo(java.util.Collection<? super M> collection, int maxElements)
drainTo in interface java.util.concurrent.BlockingQueue<M>public java.util.Iterator<M> iterator()
public java.lang.Object[] toArray()
toArray in interface java.util.Collection<M>public <X> X[] toArray(X[] a)
toArray in interface java.util.Collection<M>public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<M>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<M>public void clear()
clear in interface java.util.Collection<M>public java.lang.String toString()
toString in class java.lang.Object