#include <EventQueue.h>
Public Methods | |
EventQueue (long size=1023) | |
virtual | ~EventQueue () |
void | append (list< CORBA::Any * > &events) |
Private Attributes | |
long | _next |
Always points to the next slot to which an event will be written. More... | |
long | _size |
CORBA::Any ** | _queue |
Friends | |
class | Reader |
Events are stored as pointers to CORBA::Any. The Reader class is a mix-in for classes that need to consume events from the queue. Readers that cannot keep up with the flow of messages into the queue will skip _size events whenever the back of the queue catches up with them. This implements the usual 'fresh business first' pattern for deciding what to discard.
Events are not scavenged from the queue. This means that once the queue has filled up, it will never contain fewer than _size-1 events. This strategy is usually somewhat wasteful of memory, but guarantees that the worst-case memory usage will never rise above the defined maximum.
Definition at line 50 of file EventQueue.h.
|
Definition at line 33 of file EventQueue.cc. |
|
Definition at line 45 of file EventQueue.cc. |
|
Definition at line 53 of file EventQueue.cc. References _next, _queue, and _size. Referenced by OmniEvents::ConsumerAdmin_i::send(). |
|
Definition at line 77 of file EventQueue.h. |
|
Always points to the next slot to which an event will be written.
Definition at line 73 of file EventQueue.h. Referenced by append(), and OmniEvents::EventQueue::Reader::moreEvents(). |
|
Definition at line 75 of file EventQueue.h. Referenced by append(), EventQueue(), OmniEvents::EventQueue::Reader::nextEvent(), and ~EventQueue(). |
|
Definition at line 74 of file EventQueue.h. Referenced by append(), EventQueue(), OmniEvents::EventQueue::Reader::nextEvent(), and ~EventQueue(). |