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

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

Introduction

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

The text is from its open source code.

Subclass

java.util.concurrent.ArrayBlockingQueue has subclasses.
Click this link to see all its subclasses.

Constructor

ArrayBlockingQueue(int capacity)
Creates an ArrayBlockingQueue with the given (fixed) capacity and default access policy.
ArrayBlockingQueue(int capacity, boolean fair)
Creates an ArrayBlockingQueue with the given (fixed) capacity and the specified access policy.
ArrayBlockingQueue(int capacity, boolean fair, Collection c)
Creates an ArrayBlockingQueue with the given (fixed) capacity, the specified access policy and initially containing the elements of the given collection, added in traversal order of the collection's iterator.

Method

booleanadd(E e)
Inserts the specified element at the tail of this queue if it is possible to do so immediately without exceeding the queue's capacity, returning true upon success and throwing an IllegalStateException if this queue is full.
booleanaddAll(Collection c)
Adds all of the elements in the specified collection to this collection (optional operation).
voidclear()
Atomically removes all of the elements from this queue.
booleancontains(Object o)
Returns true if this queue contains the specified element.
intdrainTo(Collection c, int maxElements)
intdrainTo(Collection c)
booleanisEmpty()
Returns true if this collection contains no elements.
Iteratoriterator()
Returns an iterator over the elements in this queue in proper sequence.
booleanoffer(E e)
Inserts the specified element at the tail of this queue if it is possible to do so immediately without exceeding the queue's capacity, returning true upon success and false if this queue is full.
booleanoffer(E e, long timeout, TimeUnit unit)
Inserts the specified element at the tail of this queue, waiting up to the specified wait time for space to become available if the queue is full.
Epeek()
Epoll()
Epoll(long timeout, TimeUnit unit)
voidput(E e)
Inserts the specified element at the tail of this queue, waiting for space to become available if the queue is full.
intremainingCapacity()
Returns the number of additional elements that this queue can ideally (in the absence of memory or resource constraints) accept without blocking.
booleanremove(Object o)
Removes a single instance of the specified element from this queue, if it is present.
intsize()
Returns the number of elements in this queue.
Etake()
Object[]toArray()
Returns an array containing all of the elements in this queue, in proper sequence.
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.
StringtoString()