org.norther.tammi.acorn.util.concurrent
Class BoundedQueue<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
java.util.concurrent.ArrayBlockingQueue<E>
org.norther.tammi.acorn.util.concurrent.BoundedQueue<E>
- Type Parameters:
E
- the element type.
- All Implemented Interfaces:
- Serializable, Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>
- Direct Known Subclasses:
- ThresholdQueue
public class BoundedQueue<E>
- extends ArrayBlockingQueue<E>
An array-based bounded blocking queue class.
- Version:
- $Id: BoundedQueue.java,v 1.6 2009/09/28 15:08:49 cvsimp Exp $
- Author:
- Ilkka Priha
- See Also:
- Serialized Form
Constructor Summary |
BoundedQueue(int capacity)
Constructs a new queue with the specified capacity. |
BoundedQueue(int capacity,
boolean fair)
Creates a new queue with the specified capacity and access policy. |
BoundedQueue(int capacity,
boolean fair,
Collection<? extends E> c)
Creates a new queue with the specified capacity, access policy and an
initial collection. |
BoundedQueue(int capacity,
Collection<? extends E> c)
Creates a new queue with with the specified capacity and an initial
collection. |
Methods inherited from class java.util.concurrent.ArrayBlockingQueue |
add, clear, contains, drainTo, drainTo, iterator, offer, offer, peek, poll, poll, put, remainingCapacity, remove, size, take, toArray, toArray, toString |
BoundedQueue
public BoundedQueue(int capacity)
- Constructs a new queue with the specified capacity.
- Parameters:
capacity
- the capacity.
BoundedQueue
public BoundedQueue(int capacity,
Collection<? extends E> c)
- Creates a new queue with with the specified capacity and an initial
collection.
- Parameters:
capacity
- the capacity.c
- the initial collection of items.
BoundedQueue
public BoundedQueue(int capacity,
boolean fair)
- Creates a new queue with the specified capacity and access policy.
- Parameters:
capacity
- the capacity.fair
- true for FIFO, false for unspecified.
BoundedQueue
public BoundedQueue(int capacity,
boolean fair,
Collection<? extends E> c)
- Creates a new queue with the specified capacity, access policy and an
initial collection.
- Parameters:
capacity
- the capacity.fair
- true for FIFO, false for unspecified.c
- the initial collection of items.
Copyright © 2004 The Norther Organization. All rights reserved.