Example usage for Java java.util.concurrent ConcurrentLinkedQueue fields, constructors, methods, implement or subclass
The text is from its open source code.
ConcurrentLinkedQueue() Creates a ConcurrentLinkedQueue that is initially empty. | |
ConcurrentLinkedQueue(Collection extends E> c) Creates a ConcurrentLinkedQueue initially containing the elements of the given collection, added in traversal order of the collection's iterator. |
boolean | add(E e) Inserts the specified element at the tail of this queue. |
boolean | addAll(Collection extends E> c) Appends all of the elements in the specified collection to the end of this queue, in the order that they are returned by the specified collection's iterator. |
void | clear() |
boolean | contains(Object o) Returns true if this queue contains the specified element. |
void | forEach(Consumer super E> action) |
boolean | isEmpty() Returns true if this queue contains no elements. |
Iterator | iterator() Returns an iterator over the elements in this queue in proper sequence. |
void | notifyAll() Wakes up all threads that are waiting on this object's monitor. |
boolean | offer(E e) Inserts the specified element at the tail of this queue. |
E | peek() |
E | poll() |
E | remove() Retrieves and removes the head of this queue. |
boolean | remove(Object o) Removes a single instance of the specified element from this queue, if it is present. |
boolean | removeAll(Collection> c) |
int | size() Returns the number of elements in this queue. |
Stream | stream() Returns a sequential Stream with this collection as its source. |
T[] | toArray(T[] a) Returns an array containing all of the elements in this queue, in proper sequence; the runtime type of the returned array is that of the specified array. |
void | wait() Causes the current thread to wait until it is awakened, typically by being notified or interrupted. |