public class AbstractConcurrentBlockingQueue<E> extends AbstractConcurrentQueue<E> implements java.util.concurrent.BlockingQueue<E>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
waitingForItemsMonitor |
protected java.lang.Object |
waitingForRemovalMonitor |
internalQueue, lock| Constructor and Description |
|---|
AbstractConcurrentBlockingQueue(int maxCapacity,
java.util.Queue<E> internalQueue) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
boolean |
addAll(java.util.Collection<? extends E> c) |
int |
drainTo(java.util.Collection<? super E> c) |
int |
drainTo(java.util.Collection<? super E> c,
int maxElements) |
boolean |
offer(E e) |
boolean |
offer(E e,
long timeout,
java.util.concurrent.TimeUnit unit) |
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) |
E |
take() |
clear, contains, containsAll, element, isEmpty, iterator, lazyOffer, peek, remove, retainAll, size, toArray, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected final java.lang.Object waitingForItemsMonitor
protected final java.lang.Object waitingForRemovalMonitor
public AbstractConcurrentBlockingQueue(int maxCapacity,
java.util.Queue<E> internalQueue)
public E poll()
poll in interface java.util.Queue<E>poll in class AbstractConcurrentQueue<E>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<E>remove in interface java.util.concurrent.BlockingQueue<E>remove in class AbstractConcurrentQueue<E>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<E>removeAll in class AbstractConcurrentQueue<E>public boolean offer(E e)
offer in interface java.util.concurrent.BlockingQueue<E>offer in interface java.util.Queue<E>offer in class AbstractConcurrentQueue<E>public boolean add(E e)
public boolean addAll(java.util.Collection<? extends E> c)
addAll in interface java.util.Collection<E>addAll in class AbstractConcurrentQueue<E>public void put(E e) throws java.lang.InterruptedException
put in interface java.util.concurrent.BlockingQueue<E>java.lang.InterruptedExceptionpublic boolean offer(E e, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
offer in interface java.util.concurrent.BlockingQueue<E>java.lang.InterruptedExceptionpublic 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 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>