public class SingleConsumerNonblockingProducerQueue<E>
extends java.util.AbstractQueue<E>
implements java.util.concurrent.BlockingQueue<E>
| Constructor and Description |
|---|
SingleConsumerNonblockingProducerQueue(java.util.Queue<E> q) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(java.util.Collection<? extends E> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
int |
drainTo(java.util.Collection<? super E> c) |
int |
drainTo(java.util.Collection<? super E> c,
int maxElements) |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
boolean |
offer(E e) |
boolean |
offer(E e,
long timeout,
java.util.concurrent.TimeUnit unit) |
E |
peek() |
E |
poll() |
E |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
put(E e) |
int |
remainingCapacity() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
E |
take() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic SingleConsumerNonblockingProducerQueue(java.util.Queue<E> q)
public boolean offer(E e)
public E take() throws java.lang.InterruptedException
take in interface java.util.concurrent.BlockingQueue<E>java.lang.InterruptedExceptionpublic E poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
poll in interface java.util.concurrent.BlockingQueue<E>java.lang.InterruptedExceptionpublic boolean offer(E e, long timeout, java.util.concurrent.TimeUnit unit)
offer in interface java.util.concurrent.BlockingQueue<E>public int remainingCapacity()
remainingCapacity in interface java.util.concurrent.BlockingQueue<E>public int drainTo(java.util.Collection<? super E> c)
drainTo in interface java.util.concurrent.BlockingQueue<E>public int drainTo(java.util.Collection<? super E> c, int maxElements)
drainTo in interface java.util.concurrent.BlockingQueue<E>public java.lang.String toString()
toString in class java.util.AbstractCollection<E>public <T> T[] toArray(T[] a)
public java.util.Iterator<E> iterator()
public int size()
public java.lang.Object[] toArray()
public boolean retainAll(java.util.Collection<?> c)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends E> c)
public boolean removeAll(java.util.Collection<?> c)
public boolean remove(java.lang.Object o)
public boolean isEmpty()
public boolean contains(java.lang.Object o)