Classes | Public Member Functions

alma.acs.nc.CircularQueue Class Reference

List of all members.

Classes

class  EventDroppedException

Public Member Functions

 CircularQueue (int size)
 CircularQueue ()
void push (StructuredEvent e) throws EventDroppedException
void clear ()
StructuredEvent pop ()

Detailed Description

Circular Queue implemented to maintain temporally structured events when the Notify Service is down.

See also:
SimpleSupplier.publishCORBAEvent
Author:
Jorge Avarias <javarias [at] nrao.edu>

Constructor & Destructor Documentation

alma.acs.nc.CircularQueue.CircularQueue ( int  size  ) 

Initializes the Queue with custom value size

Parameters:
size the size of the queue
alma.acs.nc.CircularQueue.CircularQueue (  ) 

Initializes the Queue with default value = 100


Member Function Documentation

void alma.acs.nc.CircularQueue.clear (  ) 

Remove all the elements of the queue

StructuredEvent alma.acs.nc.CircularQueue.pop (  ) 

Remove the first element in the queue and return it. If there is no elements in the queue returns null

Returns:
the first element in the queue

Referenced by alma.acs.nc.SimpleSupplier.publishCORBAEvent().

void alma.acs.nc.CircularQueue.push ( StructuredEvent  e  )  throws EventDroppedException

Insert a structured event at the end of the queue. If the queue is full, inserts the structured event and remove the first event in the queue

Parameters:
e the event to be inserted in the queue
Exceptions:
EventDroppedException if the queue dropped an event, but the object will be inserted anyways in the queue and the removed event will be returned in the exception.

Referenced by alma.acs.nc.SimpleSupplier.publishCORBAEvent().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties