E - the type of elements held in this collectionpublic 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 and Type | Method and Description |
|---|---|
int |
drainTo(Collection<? super E> c) |
int |
drainTo(Collection<? super E> c,
int maxElements) |
boolean |
offer(E e,
long timeout,
TimeUnit unit) |
E |
poll(long timeout,
TimeUnit unit) |
void |
put(E e) |
int |
remainingCapacity() |
E |
take() |
element, offer, peek, poll, removeadd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArraytoStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, contains, offer, removeaddAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArraypublic int drainTo(Collection<? super E> c, int maxElements)
drainTo in interface BlockingQueue<E>public int drainTo(Collection<? super E> c)
drainTo in interface BlockingQueue<E>public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
offer in interface BlockingQueue<E>InterruptedExceptionpublic E poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<E>InterruptedExceptionpublic void put(E e) throws InterruptedException
put in interface BlockingQueue<E>InterruptedExceptionpublic int remainingCapacity()
remainingCapacity in interface BlockingQueue<E>public E take() throws InterruptedException
take in interface BlockingQueue<E>InterruptedExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved