com.google.common.util.concurrent. Please use ForwardingBlockingDeque instead.@Deprecated public abstract class ForwardingBlockingDeque<E> extends ForwardingDeque<E> implements java.util.concurrent.BlockingDeque<E>
BlockingDeque which forwards all its method calls to another BlockingDeque.
Subclasses should override one or more methods to modify the behavior of the backing deque as
desired per the decorator pattern.
Warning: The methods of ForwardingBlockingDeque forward indiscriminately
to the methods of the delegate. For example, overriding ForwardingCollection.add(E) alone will not change
the behaviour of offer(E, long, java.util.concurrent.TimeUnit) which can lead to unexpected behaviour. In this case, you should
override offer as well, either providing your own implementation, or delegating to the
provided standardOffer method.
default method warning: This class does not forward calls to default methods. Instead, it inherits their default implementations. When those implementations
invoke methods, they invoke methods on the ForwardingBlockingDeque.
The standard methods are not guaranteed to be thread-safe, even when all of the
methods that they depend on are thread-safe.
| Modifier | Constructor and Description |
|---|---|
protected |
ForwardingBlockingDeque()
Deprecated.
Constructor for use by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.concurrent.BlockingDeque<E> |
delegate()
Deprecated.
Returns the backing delegate instance that methods are forwarded to.
|
int |
drainTo(java.util.Collection<? super E> c)
Deprecated.
|
int |
drainTo(java.util.Collection<? super E> c,
int maxElements)
Deprecated.
|
boolean |
offer(E e,
long timeout,
java.util.concurrent.TimeUnit unit)
Deprecated.
|
boolean |
offerFirst(E e,
long timeout,
java.util.concurrent.TimeUnit unit)
Deprecated.
|
boolean |
offerLast(E e,
long timeout,
java.util.concurrent.TimeUnit unit)
Deprecated.
|
E |
poll(long timeout,
java.util.concurrent.TimeUnit unit)
Deprecated.
|
E |
pollFirst(long timeout,
java.util.concurrent.TimeUnit unit)
Deprecated.
|
E |
pollLast(long timeout,
java.util.concurrent.TimeUnit unit)
Deprecated.
|
void |
put(E e)
Deprecated.
|
void |
putFirst(E e)
Deprecated.
|
void |
putLast(E e)
Deprecated.
|
int |
remainingCapacity()
Deprecated.
|
E |
take()
Deprecated.
|
E |
takeFirst()
Deprecated.
|
E |
takeLast()
Deprecated.
|
addFirst, addLast, descendingIterator, getFirst, getLast, offerFirst, offerLast, peekFirst, peekLast, pollFirst, pollLast, pop, push, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrenceelement, 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, addFirst, addLast, contains, element, iterator, offer, offerFirst, offerLast, peek, poll, push, remove, remove, removeFirstOccurrence, removeLastOccurrence, sizedescendingIterator, getFirst, getLast, peekFirst, peekLast, pollFirst, pollLast, pop, removeFirst, removeLastprotected ForwardingBlockingDeque()
protected abstract java.util.concurrent.BlockingDeque<E> delegate()
ForwardingObjectForwardingSet.delegate(). Concrete subclasses override this method to supply the
instance being decorated.delegate in class ForwardingDeque<E>public int remainingCapacity()
remainingCapacity in interface java.util.concurrent.BlockingQueue<E>public void putFirst(E e) throws java.lang.InterruptedException
putFirst in interface java.util.concurrent.BlockingDeque<E>java.lang.InterruptedExceptionpublic void putLast(E e) throws java.lang.InterruptedException
putLast in interface java.util.concurrent.BlockingDeque<E>java.lang.InterruptedExceptionpublic boolean offerFirst(E e, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
offerFirst in interface java.util.concurrent.BlockingDeque<E>java.lang.InterruptedExceptionpublic boolean offerLast(E e, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
offerLast in interface java.util.concurrent.BlockingDeque<E>java.lang.InterruptedExceptionpublic E takeFirst() throws java.lang.InterruptedException
takeFirst in interface java.util.concurrent.BlockingDeque<E>java.lang.InterruptedExceptionpublic E takeLast() throws java.lang.InterruptedException
takeLast in interface java.util.concurrent.BlockingDeque<E>java.lang.InterruptedException@CheckForNull public E pollFirst(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
pollFirst in interface java.util.concurrent.BlockingDeque<E>java.lang.InterruptedException@CheckForNull public E pollLast(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
pollLast in interface java.util.concurrent.BlockingDeque<E>java.lang.InterruptedExceptionpublic void put(E e) throws java.lang.InterruptedException
public boolean offer(E e, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
public E take() throws java.lang.InterruptedException
@CheckForNull public E poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
public int drainTo(java.util.Collection<? super E> c)
drainTo in interface java.util.concurrent.BlockingQueue<E>