org.jacorb.notification.queue

Class BoundedFifoEventQueue

public class BoundedFifoEventQueue extends AbstractBoundedEventQueue

Note that most of the methods are not thread-safe. this causes no problem as the methods are not intended to be directly called by clients. instead the superclass implements the interface EventQueue and invokes the methods thereby synchronizing access.

Version: $Id: BoundedFifoEventQueue.java,v 1.7 2006/02/25 15:28:40 alphonse.bendt Exp $

Author: Alphonse Bendt

Constructor Summary
BoundedFifoEventQueue(int maxSize, EventQueueOverflowStrategy overflowStrategy)
BoundedFifoEventQueue(int maxSize, EventQueueOverflowStrategy overflowStrategy, Object lock)
Method Summary
protected voidaddElement(Message e)
protected Message[]getAllElements()
protected MessagegetEarliestTimeout()
protected Message[]getElements(int max)
protected MessagegetLeastPriority()
protected MessagegetNextElement()
protected MessagegetOldestElement()
StringgetOrderPolicyName()
intgetSize()
protected MessagegetYoungestElement()
booleanisEmpty()

Constructor Detail

BoundedFifoEventQueue

public BoundedFifoEventQueue(int maxSize, EventQueueOverflowStrategy overflowStrategy)

BoundedFifoEventQueue

public BoundedFifoEventQueue(int maxSize, EventQueueOverflowStrategy overflowStrategy, Object lock)

Method Detail

addElement

protected void addElement(Message e)

getAllElements

protected Message[] getAllElements()

getEarliestTimeout

protected Message getEarliestTimeout()

getElements

protected Message[] getElements(int max)

getLeastPriority

protected Message getLeastPriority()

getNextElement

protected Message getNextElement()

getOldestElement

protected Message getOldestElement()

getOrderPolicyName

public String getOrderPolicyName()

getSize

public int getSize()

getYoungestElement

protected Message getYoungestElement()

isEmpty

public boolean isEmpty()