org.openorb.notify.queue
Class FifoOrderer
java.lang.Object
|
+--org.openorb.notify.queue.FifoOrderer
- All Implemented Interfaces:
- Orderer
- public class FifoOrderer
- extends java.lang.Object
- implements Orderer
This orderer implements a Fifo ( First-in first-out mechanism ).
- Author:
- Olivier Modica, Shawn Boyce
|
Constructor Summary |
FifoOrderer()
Default constructor with an initial capacity of 10
and a capacity increment of 10 |
FifoOrderer(int initialCapacity)
Constructor with a specified initial capacity. |
|
Method Summary |
int |
getQueueSize()
Get the current queue size. |
java.lang.Object |
pullEvent()
Invoked to pull an event from the queue. |
void |
pushEvent(java.lang.Object event,
java.lang.Short priorityKey,
java.lang.Long timeoutKey)
Invoked to push an event into the queue with respect to order. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FifoOrderer
public FifoOrderer()
- Default constructor with an initial capacity of 10
and a capacity increment of 10
FifoOrderer
public FifoOrderer(int initialCapacity)
- Constructor with a specified initial capacity.
pushEvent
public void pushEvent(java.lang.Object event,
java.lang.Short priorityKey,
java.lang.Long timeoutKey)
- Invoked to push an event into the queue with respect to order.
- Specified by:
pushEvent in interface Orderer
- Parameters:
priorityKey - not usedtimeoutKey - not used
pullEvent
public java.lang.Object pullEvent()
- Invoked to pull an event from the queue.
- Specified by:
pullEvent in interface Orderer
getQueueSize
public int getQueueSize()
- Get the current queue size.
- Specified by:
getQueueSize in interface Orderer