TibrvQueue
Class
Declaration
classTibrvQueue
: TibrvDispatchable
TibrvQueue(); // Construct empty.
virtual ~TibrvQueue(); // Destroy and reclaim storage.
Purpose
Event queue.
Remarks
Each event is associated with a TibrvQueue object; when the event occurs, Rendezvous software places the event object in its queue. Programs dispatch queues to process events.
The constructor produces a hollow object; TibrvQueue::create() makes it operational.
The destructor calls the destroy
method, unless the C object is already destroyed.
Default Queue
The method Tibrv::defaultQueue() returns a pre-defined queue. Programs that need only one event queue can use this default queue (instead of using TibrvQueue::create() to create one). The default queue has priority 1, can hold an unlimited number of events, and never discards an event (since it never exceeds an event limit).
Rendezvous software places all advisories pertaining to queue overflow on the default queue.
Programs must not destroy the default queue, except as a side effect of Tibrv::close(). Programs cannot change the parameters of the default queue.
Limit Policy
These constants specify the possible strategies for resolving overflow of queue limit.
Constant |
Description |
Never discard events; use this policy when a queue has no limit on then number of events it can contain. |
|
|
Discard the first event in the queue (that is, the oldest event in the queue, which would otherwise be the next event to dispatch). |
|
Discard the last event in the queue (that is, the youngest event in the queue). |
|
Discard the new event (which would otherwise cause the queue to overflow its maximum events limit). |
Method |
Description |
Life Cycle
|
|
Dispatch
|
|
Properties
|
|
Inherited Methods |