public class BoundedBlockingQueue<E>
extends java.util.AbstractQueue<E>
implements java.util.concurrent.BlockingQueue<E>
Constructor and Description |
---|
BoundedBlockingQueue(int maxCapacity,
java.util.Queue<E> backing) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
contains(java.lang.Object e) |
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() |
protected java.util.concurrent.locks.ReentrantLock |
lock() |
int |
maxCapacity() |
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 e) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
E |
take() |
java.lang.Object[] |
toArray() |
<X> X[] |
toArray(X[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public BoundedBlockingQueue(int maxCapacity, java.util.Queue<E> backing)
public int maxCapacity()
protected java.util.concurrent.locks.ReentrantLock lock()
public boolean offer(E e)
public boolean offer(E e, long timeout, java.util.concurrent.TimeUnit unit)
offer
in interface java.util.concurrent.BlockingQueue<E>
public E poll(long timeout, java.util.concurrent.TimeUnit unit)
poll
in interface java.util.concurrent.BlockingQueue<E>
public boolean remove(java.lang.Object e)
public boolean contains(java.lang.Object e)
public void clear()
public int remainingCapacity()
remainingCapacity
in interface java.util.concurrent.BlockingQueue<E>
public int size()
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 boolean containsAll(java.util.Collection<?> c)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public boolean isEmpty()