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