org.opennms.core.queue
Interface BoundedFifoQueue<T>

All Superinterfaces:
FifoQueue<T>

public interface BoundedFifoQueue<T>
extends FifoQueue<T>

This interface is used to define a queue with First In, First Out semantics that has a maximum input size. The base interface class defines the methods for preforming the first in, first out queue algorithm. This interface is used to mark an implementation as having a maximum size in the number of elements that can be added to the queue.

Once the maximum size is reached it is up to the implementation to determine if it should block the adding thread, or generate an exception.

Author:
Brian Weaver

Method Summary
 boolean isFull()
          Returns true if the queue has reached the maximum number of elements it can hold.
 int maxSize()
          Returns the maximum number of elements that can be contained in the FIFO queue.
 
Methods inherited from interface org.opennms.core.queue.FifoQueue
add, add, isEmpty, remove, remove, size
 

Method Detail

maxSize

int maxSize()
Returns the maximum number of elements that can be contained in the FIFO queue.

Returns:
The maximum number of elements storable in the queue.

isFull

boolean isFull()
Returns true if the queue has reached the maximum number of elements it can hold.

Returns:
True if the queue is at maximum capacity.


Copyright © 2011. All Rights Reserved.