ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, > Class Template ReferenceA threaded message queueing facility, modeled after the queueing facilities in System V STREAMs which can enqueue multiple messages in one call. More...
Inheritance diagram for ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, >:
![]()
Collaboration diagram for ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, >:
![]()
Detailed Descriptiontemplate<class ACE_MESSAGE_TYPE, ACE_SYNCH_DECL>
A threaded message queueing facility, modeled after the queueing facilities in System V STREAMs which can enqueue multiple messages in one call.
|
ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, >::ACE_Message_Queue_Ex_N | ( | size_t | high_water_mark = ACE_Message_Queue_Base::DEFAULT_HWM , |
|
size_t | low_water_mark = ACE_Message_Queue_Base::DEFAULT_LWM , |
|||
ACE_Notification_Strategy * | ns = 0 | |||
) | [inline] |
Initialize an ACE_Message_Queue_Ex_N. The high_water_mark determines how many bytes can be stored in a queue before it's considered "full." Supplier threads must block until the queue is no longer full. The low_water_mark determines how many bytes must be in the queue before supplier threads are allowed to enqueue additional messages. By default, the high_water_mark equals the low_water_mark, which means that suppliers will be able to enqueue new messages as soon as a consumer removes any message from the queue. Making the low_water_mark smaller than the high_water_mark forces consumers to drain more messages from the queue before suppliers can enqueue new messages, which can minimize the "silly window syndrome."
ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, >::~ACE_Message_Queue_Ex_N | ( | void | ) | [inline, virtual] |
Close down the message queue and release all resources.
int ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, >::enqueue_head | ( | ACE_MESSAGE_TYPE * | new_item, | |
ACE_Time_Value * | tv = 0 | |||
) | [inline, virtual] |
Enqueue one or more ACE_MESSAGE_TYPE
objects at the head of the queue. If the new_item next()
pointer is non-zero, it is assumed to be the start of a series of ACE_MESSAGE_TYPE
objects connected via their next()
pointers. The series of blocks will be added to the queue in the same order they are passed in as.
new_item | Pointer to an ACE_MESSAGE_TYPE that will be added to the queue. If the block's next() pointer is non-zero, all blocks chained from the next() pointer are enqueued as well. | |
tv | The absolute time the caller will wait until for the block to be queued. |
>0 | The number of ACE_MESSAGE_TYPE objects on the queue after adding the specified block(s). | |
-1 | On failure. errno holds the reason. Common errno values are:
|
Reimplemented from ACE_Message_Queue_Ex< ACE_MESSAGE_TYPE, ACE_SYNCH_USE >.
int ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, >::enqueue_tail | ( | ACE_MESSAGE_TYPE * | new_item, | |
ACE_Time_Value * | tv = 0 | |||
) | [inline, virtual] |
Enqueue one or more ACE_MESSAGE_TYPE
objects at the tail of the queue. If the new_item next()
pointer is non-zero, it is assumed to be the start of a series of ACE_MESSAGE_TYPE
objects connected via their next()
pointers. The series of blocks will be added to the queue in the same order they are passed in as.
new_item | Pointer to an ACE_MESSAGE_TYPE that will be added to the queue. If the block's next() pointer is non-zero, all blocks chained from the next() pointer are enqueued as well. | |
tv | The absolute time the caller will wait until for the block to be queued. |
>0 | The number of ACE_MESSAGE_TYPE objects on the queue after adding the specified block(s). | |
-1 | On failure. errno holds the reason. Common errno values are:
|
Reimplemented from ACE_Message_Queue_Ex< ACE_MESSAGE_TYPE, ACE_SYNCH_USE >.
ACE_Message_Block * ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, >::wrap_with_mbs_i | ( | ACE_MESSAGE_TYPE * | new_item | ) | [inline, protected] |
An helper method that wraps the incoming chain messages with ACE_Message_Blocks.
ACE_Message_Queue_Ex_N< ACE_MESSAGE_TYPE, >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
Reimplemented from ACE_Message_Queue_Ex< ACE_MESSAGE_TYPE, ACE_SYNCH_USE >.