#include <Message_Queue.h>
Inheritance diagram for ACE_Message_Queue_Base:
Public Types | |
enum | { DEFAULT_HWM = 16 * 1024, DEFAULT_LWM = 16 * 1024, WAS_ACTIVE = 1, ACTIVATED = 1, WAS_INACTIVE = 2, DEACTIVATED = 2, PULSED = 3 } |
Public Methods | |
ACE_Message_Queue_Base (void) | |
virtual int | close (void)=0 |
Close down the message queue and release all resources. More... | |
virtual | ~ACE_Message_Queue_Base (void) |
Close down the message queue and release all resources. More... | |
virtual int | peek_dequeue_head (ACE_Message_Block *&first_item, ACE_Time_Value *timeout=0)=0 |
Retrieve the first <ACE_Message_Block> without removing it. More... | |
virtual int | enqueue_tail (ACE_Message_Block *new_item, ACE_Time_Value *timeout=0)=0 |
Enqueue a <ACE_Message_Block *> into the tail of the queue. More... | |
virtual int | enqueue (ACE_Message_Block *new_item, ACE_Time_Value *timeout=0)=0 |
virtual int | dequeue_head (ACE_Message_Block *&first_item, ACE_Time_Value *timeout=0)=0 |
Dequeue and return the <ACE_Message_Block *> at the head of the queue. More... | |
virtual int | dequeue (ACE_Message_Block *&first_item, ACE_Time_Value *timeout=0)=0 |
virtual int | is_full (void)=0 |
True if queue is full, else false. More... | |
virtual int | is_empty (void)=0 |
True if queue is empty, else false. More... | |
virtual size_t | message_bytes (void)=0 |
Number of total bytes on the queue, i.e., sum of the message block sizes. More... | |
virtual size_t | message_length (void)=0 |
Number of total length on the queue, i.e., sum of the message block lengths. More... | |
virtual int | message_count (void)=0 |
Number of total messages on the queue. More... | |
virtual void | message_bytes (size_t new_size)=0 |
New value of the number of total bytes on the queue, i.e., sum of the message block sizes. More... | |
virtual void | message_length (size_t new_length)=0 |
New value of the number of total length on the queue, i.e., sum of the message block lengths. More... | |
virtual int | deactivate (void)=0 |
Deactivate the queue and wake up all threads waiting on the queue so they can continue. More... | |
virtual int | activate (void)=0 |
Reactivate the queue so that threads can enqueue and dequeue messages again. More... | |
virtual int | pulse (void)=0 |
Pulse the queue to wake up any waiting threads. More... | |
virtual int | state (void) |
Returns the current state of the queue. More... | |
virtual int | deactivated (void)=0 |
Returns 1 if the state of the queue is DEACTIVATED, and 0 if the queue's state is ACTIVATED or PULSED. More... | |
virtual ACE_Notification_Strategy * | notification_strategy (void)=0 |
Get the notification strategy for the <Message_Queue>. More... | |
virtual void | notification_strategy (ACE_Notification_Strategy *s)=0 |
Set the notification strategy for the <Message_Queue>. More... | |
virtual void | dump (void) const=0 |
Dump the state of an object. More... | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Protected Attributes | |
int | state_ |
Indicates the state of the queue, which can be <ACTIVATED>, <DEACTIVATED>, or <PULSED>. More... | |
Private Methods | |
void | operator= (const ACE_Message_Queue_Base &) |
ACE_Message_Queue_Base (const ACE_Message_Queue_Base &) |
For all the <ACE_Time_Value> pointer parameters the caller will block until action is possible if <timeout> == 0. Otherwise, it will wait until the absolute time specified in *<timeout> elapses.
A queue is always in one of three states: . ACTIVATED . DEACTIVATED . PULSED
|
|
|
|
Close down the message queue and release all resources.
|
|
|
|
Reactivate the queue so that threads can enqueue and dequeue messages again.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Close down the message queue and release all resources.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Deactivate the queue and wake up all threads waiting on the queue so they can continue.
No messages are removed from the queue, however. Any other operations called until the queue is activated again will immediately return -1 with
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Returns 1 if the state of the queue is DEACTIVATED, and 0 if the queue's state is ACTIVATED or PULSED.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Dequeue and return the <ACE_Message_Block *> at the head of the queue. Returns number of items in queue if the call succeeds or -1 otherwise. These calls return -1 when queue is closed, deactivated (in which case <errno> == <ESHUTDOWN>), when a signal occurs (in which case <errno> == <EINTR>, or if the time specified in timeout elapses (in which case <errno> == <EWOULDBLOCK>). Reimplemented in ACE_Message_Queue, ACE_Dynamic_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Dump the state of an object.
Reimplemented in ACE_Message_Queue, ACE_Dynamic_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Enqueue a <ACE_Message_Block *> into the tail of the queue. Returns number of items in queue if the call succeeds or -1 otherwise. These calls return -1 when queue is closed, deactivated (in which case <errno> == <ESHUTDOWN>), when a signal occurs (in which case <errno> == <EINTR>, or if the time specified in timeout elapses (in which case <errno> == <EWOULDBLOCK>). Reimplemented in ACE_Message_Queue, ACE_Dynamic_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
True if queue is empty, else false.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
True if queue is full, else false.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
New value of the number of total bytes on the queue, i.e., sum of the message block sizes.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Number of total bytes on the queue, i.e., sum of the message block sizes.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Number of total messages on the queue.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
New value of the number of total length on the queue, i.e., sum of the message block lengths.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Number of total length on the queue, i.e., sum of the message block lengths.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Set the notification strategy for the <Message_Queue>.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Get the notification strategy for the <Message_Queue>.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
|
|
Retrieve the first <ACE_Message_Block> without removing it. Note that <timeout> uses <{absolute}> time rather than <{relative}> time. If the <timeout> elapses without receiving a message -1 is returned and <errno> is set to <EWOULDBLOCK>. If the queue is deactivated -1 is returned and <errno> is set to <ESHUTDOWN>. Otherwise, returns -1 on failure, else the number of items still on the queue. Reimplemented in ACE_Message_Queue, ACE_Dynamic_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Pulse the queue to wake up any waiting threads. Changes the queue state to PULSED; future enqueue/dequeue operations proceed as in ACTIVATED state.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Returns the current state of the queue.
Reimplemented in ACE_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Message_Queue, ACE_Dynamic_Message_Queue, ACE_Message_Queue< ACE_SYNCH >, ACE_Message_Queue< ACE_SYNCH_USE >, and ACE_Message_Queue< ACE_MT_SYNCH >. |
|
Indicates the state of the queue, which can be <ACTIVATED>, <DEACTIVATED>, or <PULSED>.
|