Class BlockingArrayQueue<E>

  • Type Parameters:
    E - The element type
    All Implemented Interfaces:
    Iterable<E>, Collection<E>, BlockingQueue<E>, List<E>, Queue<E>

    public class BlockingArrayQueue<E>
    extends AbstractList<E>
    implements BlockingQueue<E>
    A BlockingQueue backed by a circular array capable or growing.

    This queue is uses a variant of the two lock queue algorithm to provide an efficient queue or list backed by a growable circular array.

    Unlike ArrayBlockingQueue, this class is able to grow and provides a blocking put call.

    The queue has both a capacity (the size of the array currently allocated) and a max capacity (the maximum size that may be allocated), which defaults to Integer.MAX_VALUE.