Java java.util.concurrent BlockingQueue fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent BlockingQueue fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent BlockingQueue.

The text is from its open source code.

Implementation

java.util.concurrent.BlockingQueue has the following implementations.
Click this link to see all its implementation.

Method

booleanadd(E e)
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning true upon success and throwing an IllegalStateException if no space is currently available.
booleanaddAll(Collection c)
Adds all of the elements in the specified collection to this collection (optional operation).
voidclear()
Removes all of the elements from this collection (optional operation).
booleancontains(Object o)
Returns true if this queue contains the specified element.
intdrainTo(Collection c, int maxElements)
Removes at most the given number of available elements from this queue and adds them to the given collection.
intdrainTo(Collection c)
Removes all available elements from this queue and adds them to the given collection.
Eelement()
Retrieves, but does not remove, the head of this queue.
inthashCode()
Returns the hash code value for this collection.
booleanisEmpty()
Returns true if this collection contains no elements.
Iteratoriterator()
Returns an iterator over the elements in this collection.
booleanoffer(E e, long timeout, TimeUnit unit)
Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.
booleanoffer(E e)
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available.
Epeek()
Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
Epoll(long timeout, TimeUnit unit)
Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.
Epoll()
Retrieves and removes the head of this queue, or returns null if this queue is empty.
voidput(E e)
Inserts the specified element into this queue, waiting if necessary for space to become available.
intremainingCapacity()
Returns the number of additional elements that this queue can ideally (in the absence of memory or resource constraints) accept without blocking, or Integer.MAX_VALUE if there is no intrinsic limit.
booleanremove(Object o)
Removes a single instance of the specified element from this queue, if it is present.
Eremove()
Retrieves and removes the head of this queue.
intsize()
Returns the number of elements in this collection.
Etake()
Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.
T[]toArray(T[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
Object[]toArray()
Returns an array containing all of the elements in this collection.