API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent. BlockingDeque View Source
Author(s)
Doug Lea
Since
1.6
Version
Serial
Hierarchy
 Iterable
      Collection
          Queue
              BlockingQueue
                  BlockingDeque
Subinterfaces
Description
public interface BlockingDeque
  A Deque that additionally supports blocking operations that wait for the deque to become non-empty when retrieving an element, and wait for space to become available in the deque when storing an element.
See also:   
Methods
Hide/Show inherited methods
public boolean add ( E e) [Specified in BlockingQueue]
  Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque) if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available.
public void addFirst ( E e) [Specified in Deque]
  Inserts the specified element at the front of this deque if it is possible to do so immediately without violating capacity restrictions, throwing an IllegalStateException if no space is currently available.
public void addLast ( E e) [Specified in Deque]
  Inserts the specified element at the end of this deque if it is possible to do so immediately without violating capacity restrictions, throwing an IllegalStateException if no space is currently available.
public boolean contains (Object o) [Specified in BlockingQueue]
  Returns true if this deque contains the specified element.
public E element () [Specified in Deque]
  Retrieves, but does not remove, the head of the queue represented by this deque (in other words, the first element of this deque).
public Iterator< E> iterator () [Specified in Deque]
  Returns an iterator over the elements in this deque in proper sequence.
public boolean offer ( E e) [Specified in BlockingQueue]
  Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque) if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available.
public boolean offer ( E e, long timeout, TimeUnit unit) throws InterruptedException [Specified in BlockingQueue]
  Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque), waiting up to the specified wait time if necessary for space to become available.
public boolean offerFirst ( E e) [Specified in Deque]
  Inserts the specified element at the front of this deque if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available.
public boolean offerFirst ( E e, long timeout, TimeUnit unit) throws InterruptedException
  Inserts the specified element at the front of this deque, waiting up to the specified wait time if necessary for space to become available.
public boolean offerLast ( E e) [Specified in Deque]
  Inserts the specified element at the end of this deque if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available.
public boolean offerLast ( E e, long timeout, TimeUnit unit) throws InterruptedException
  Inserts the specified element at the end of this deque, waiting up to the specified wait time if necessary for space to become available.
public E peek () [Specified in Deque]
  Retrieves, but does not remove, the head of the queue represented by this deque (in other words, the first element of this deque), or returns null if this deque is empty.
public E poll () [Specified in Deque]
  Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), or returns null if this deque is empty.
public E poll (long timeout, TimeUnit unit) throws InterruptedException [Specified in BlockingQueue]
  Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), waiting up to the specified wait time if necessary for an element to become available.
public E pollFirst (long timeout, TimeUnit unit) throws InterruptedException
  Retrieves and removes the first element of this deque, waiting up to the specified wait time if necessary for an element to become available.
public E pollLast (long timeout, TimeUnit unit) throws InterruptedException
  Retrieves and removes the last element of this deque, waiting up to the specified wait time if necessary for an element to become available.
public void push ( E e) [Specified in Deque]
  Pushes an element onto the stack represented by this deque.
public void put ( E e) throws InterruptedException [Specified in BlockingQueue]
  Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque), waiting if necessary for space to become available.
public void putFirst ( E e) throws InterruptedException
  Inserts the specified element at the front of this deque, waiting if necessary for space to become available.
public void putLast ( E e) throws InterruptedException
  Inserts the specified element at the end of this deque, waiting if necessary for space to become available.
public E remove () [Specified in Deque]
  Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque).
public boolean remove (Object o) [Specified in BlockingQueue]
  Removes the first occurrence of the specified element from this deque.
public boolean removeFirstOccurrence (Object o) [Specified in Deque]
  Removes the first occurrence of the specified element from this deque.
public boolean removeLastOccurrence (Object o) [Specified in Deque]
  Removes the last occurrence of the specified element from this deque.
public int size () [Specified in Deque]
  Returns the number of elements in this deque.
public E take () throws InterruptedException [Specified in BlockingQueue]
  Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), waiting if necessary until an element becomes available.
public E takeFirst () throws InterruptedException
  Retrieves and removes the first element of this deque, waiting if necessary until an element becomes available.
public E takeLast () throws InterruptedException
  Retrieves and removes the last element of this deque, waiting if necessary until an element becomes available.
Fields
Hide/Show inherited fields
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar