org.openorb.notify.queue

Class PriorityOrderer

public class PriorityOrderer extends Object implements Orderer

This orderer sorts the events in the queue according to the integer priority value.

Author: Olivier Modica Shawn Boyce

Constructor Summary
PriorityOrderer()
Default constructor.
Method Summary
intgetQueueSize()
Get the current queue size.
ObjectpullEvent()
Invoked to pull an event from the queue.
voidpushEvent(Object event, Short priorityKey, Long timeoutKey)
Invoked to push an event into the queue with respect to order.

Constructor Detail

PriorityOrderer

public PriorityOrderer()
Default constructor.

Method Detail

getQueueSize

public int getQueueSize()
Get the current queue size.

pullEvent

public Object pullEvent()
Invoked to pull an event from the queue.

pushEvent

public void pushEvent(Object event, Short priorityKey, Long timeoutKey)
Invoked to push an event into the queue with respect to order.

Parameters: timeoutKey not used