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, spliterator, toArray, toArray
clear, element, remove
containsAll, removeAll, retainAll, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, contains
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
public 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>
InterruptedException
public T poll()
public T poll(long timeout, TimeUnit unit) throws InterruptedException
poll
in interface BlockingQueue<T>
InterruptedException
public 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>
InterruptedException
public boolean offer(T t, long timeout, TimeUnit unit) throws InterruptedException
offer
in interface BlockingQueue<T>
InterruptedException
public int drainTo(Collection<? super T> c, int maxElements)
drainTo
in interface BlockingQueue<T>
Copyright © 2017 JBoss, a division of Red Hat. All rights reserved.