E - the type of elements held in this collection
public abstract class ForwardingBlockingQueue<E> extends ForwardingQueue<E> implements BlockingQueue <E>
BlockingQueue which forwards all its method calls to another
BlockingQueue. Subclasses should override one or more methods to modify the behavior of the backing collection as desired per the
decorator pattern.
| Modifier | Constructor and Description |
|---|---|
protected |
ForwardingBlockingQueue()
Constructor for use by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract BlockingQueue |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
int |
drainTo(Collection
|
int |
drainTo(Collection
|
boolean |
offer(E e, long timeout, TimeUnit
|
E |
poll(long timeout, TimeUnit
|
void |
put(E e)
|
int |
remainingCapacity()
|
E |
take()
|
element, offer, peek, poll, remove, standardOffer, standardPeek, standardPolladd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRemoveAll, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArraytoStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, contains, offer, removeaddAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayprotected ForwardingBlockingQueue()
protected abstract BlockingQueue<E> delegate()
ForwardingObject
ForwardingSet.delegate() . Concrete subclasses override this method to supply the instance being decorated.
public int drainTo(Collection<? super E> c, int maxElements)
public int drainTo(Collection<? super E> c)
public boolean offer(E e, long timeout, TimeUnitunit) throws InterruptedException
offer in interface
BlockingQueue<E>
InterruptedException
public E poll(long timeout, TimeUnitunit) throws InterruptedException
poll in interface
BlockingQueue<E>
InterruptedException
public void put(E e) throws InterruptedException
put in interface
BlockingQueue<E>
InterruptedException
public int remainingCapacity()
public E take() throws InterruptedException
take in interface
BlockingQueue<E>
InterruptedException