KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > util > concurrent > LinkedBlockingQueue

java.util.concurrent
Class LinkedBlockingQueue<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<E>
          extended by java.util.concurrent.LinkedBlockingQueue<E>
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>
See Also:
Iterator, Integer.MAX_VALUE

public void clear()
See Also:
E, AbstractQueue, Collection
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1283]A bug in LinkedBlockingQueue.clear
By Anonymous on 2005/01/31 11:53:22  Rate
This method is broken. Do not use it!!! Once called, you will eventually get a NullPointerException the next time you try to clear the queue... 
  
  
 For reference, see: 
  
  
 http://altair.cs.oswego.edu/pipermail/concurrency-interest/2004-December/001159.html 
  
  
 


[1284]_
By Anonymous on 2005/01/31 21:38:51  Rate
* ConcurrentLinkedList.isEmpty failed to override inherited javadoc. 
 * ThreadLocal.remove did not state that the value could also be  
 reinitialized using ThreadLocal.set. 
 * A bug in LinkedBlockingQueue.clear and LinkedBlockingQueue.drainTo  
 caused subsequently added elements not to be accessible.  
  
  
 


public int drainTo(Collection<? super E> c)
See Also:
BlockingQueue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int drainTo(Collection<? super E> c,
                   int maxElements)
See Also:
BlockingQueue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Iterator<E> iterator()
See Also:
AbstractCollection, Collection, Iterable, ConcurrentModificationException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public LinkedBlockingQueue()
See Also:
Integer.MAX_VALUE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public LinkedBlockingQueue(int capacity)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public LinkedBlockingQueue(Collection<? extends E> c)
See Also:
NullPointerException, Integer.MAX_VALUE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean offer(E o)
See Also:
NullPointerException, Queue, BlockingQueue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean offer(E o,
                     long timeout,
                     TimeUnit unit)
              throws InterruptedException
See Also:
NullPointerException, BlockingQueue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public E peek()
See Also:
Queue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public E poll()
See Also:
Queue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public E poll(long timeout,
              TimeUnit unit)
       throws InterruptedException
See Also:
BlockingQueue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void put(E o)
         throws InterruptedException
See Also:
NullPointerException, BlockingQueue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int remainingCapacity()
See Also:
E, BlockingQueue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean remove(Object o)
See Also:
E, AbstractCollection, Collection
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int size()
See Also:
E, AbstractCollection, Collection
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public E take()
       throws InterruptedException
See Also:
BlockingQueue
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object[] toArray()
See Also:
E, AbstractCollection, Collection
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public <T> T[] toArray(T[] a)
See Also:
E, AbstractCollection, Collection
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String toString()
See Also:
E, AbstractCollection
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags