public class ConcurrentLinkedBlockingQueue<T> extends ConcurrentLinkedQueue<T> implements BlockingQueue<T>
| Constructor and Description |
|---|
ConcurrentLinkedBlockingQueue(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
int |
drainTo(Collection<? super T> c) |
int |
drainTo(Collection<? super T> c,
int maxElements) |
boolean |
offer(T t)
Drops elements if capacity has been reached.
|
boolean |
offer(T t,
long timeout,
TimeUnit unit) |
T |
poll() |
T |
poll(long timeout,
TimeUnit unit) |
void |
put(T t) |
int |
remainingCapacity() |
boolean |
remove(Object o) |
T |
take() |
add, addAll, contains, isEmpty, iterator, peek, size, toArray, toArrayclear, element, removecontainsAll, removeAll, retainAll, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, containspublic boolean offer(T t)
offer in interface BlockingQueue<T>offer in interface Queue<T>offer in class ConcurrentLinkedQueue<T>t - public T take() throws InterruptedException
take in interface BlockingQueue<T>InterruptedExceptionpublic T poll()
public T poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<T>InterruptedExceptionpublic boolean remove(Object o)
remove in interface Collection<T>remove in interface BlockingQueue<T>remove in class ConcurrentLinkedQueue<T>public int remainingCapacity()
remainingCapacity in interface BlockingQueue<T>public int drainTo(Collection<? super T> c)
drainTo in interface BlockingQueue<T>public void put(T t) throws InterruptedException
put in interface BlockingQueue<T>InterruptedExceptionpublic boolean offer(T t, long timeout, TimeUnit unit) throws InterruptedException
offer in interface BlockingQueue<T>InterruptedExceptionpublic int drainTo(Collection<? super T> c, int maxElements)
drainTo in interface BlockingQueue<T>Copyright © 2012 JBoss by Red Hat. All Rights Reserved.