ACE_Dynamic_Message_Queue<> Class Template ReferenceA derived class which adapts the ACE_Message_Queue class in order to maintain dynamic priorities for enqueued <ACE_Message_Blocks> and manage the queue order according to these dynamic priorities. More...
Inheritance diagram for ACE_Dynamic_Message_Queue<>:
Collaboration diagram for ACE_Dynamic_Message_Queue<>:
Detailed Descriptiontemplate<ACE_SYNCH_DECL>
A derived class which adapts the ACE_Message_Queue class in order to maintain dynamic priorities for enqueued <ACE_Message_Blocks> and manage the queue order according to these dynamic priorities.
|
ACE_Dynamic_Message_Queue<>::ACE_Dynamic_Message_Queue | ( | ACE_Dynamic_Message_Strategy & | message_strategy, | |
size_t | hwm = ACE_Message_Queue_Base::DEFAULT_HWM , |
|||
size_t | lwm = ACE_Message_Queue_Base::DEFAULT_LWM , |
|||
ACE_Notification_Strategy * | ns = 0 | |||
) | [inline] |
ACE_Dynamic_Message_Queue<>::~ACE_Dynamic_Message_Queue | ( | void | ) | [inline, virtual] |
Close down the message queue and release all resources.
ACE_Dynamic_Message_Queue<>::ACE_Dynamic_Message_Queue | ( | const ACE_Dynamic_Message_Queue< _ACE_SYNCH > & | ) | [private] |
int ACE_Dynamic_Message_Queue<>::remove_messages | ( | ACE_Message_Block *& | list_head, | |
ACE_Message_Block *& | list_tail, | |||
u_int | status_flags | |||
) | [inline, virtual] |
Detach all messages with status given in the passed flags from the queue and return them by setting passed head and tail pointers to the linked list they comprise. This method is intended primarily as a means of periodically harvesting messages that have missed their deadlines, but is available in its most general form. All messages are returned in priority order, from head to tail, as of the time this method was called.
int ACE_Dynamic_Message_Queue<>::dequeue_head | ( | ACE_Message_Block *& | first_item, | |
ACE_Time_Value * | timeout = 0 | |||
) | [inline, virtual] |
Dequeue and return the <ACE_Message_Block *> at the head of the queue. Returns -1 on failure, else the number of items still on the queue.
Reimplemented from ACE_Message_Queue< ACE_SYNCH_USE >.
void ACE_Dynamic_Message_Queue<>::dump | ( | void | ) | const [inline, virtual] |
int ACE_Dynamic_Message_Queue<>::enqueue_tail | ( | ACE_Message_Block * | new_item, | |
ACE_Time_Value * | timeout = 0 | |||
) | [inline, virtual] |
Just call priority enqueue method: tail enqueue semantics for dynamic message queues are unstable: the message may or may not be where it was placed after the queue is refreshed prior to the next enqueue or dequeue operation.
Reimplemented from ACE_Message_Queue< ACE_SYNCH_USE >.
int ACE_Dynamic_Message_Queue<>::enqueue_head | ( | ACE_Message_Block * | new_item, | |
ACE_Time_Value * | timeout = 0 | |||
) | [inline, virtual] |
Just call priority enqueue method: head enqueue semantics for dynamic message queues are unstable: the message may or may not be where it was placed after the queue is refreshed prior to the next enqueue or dequeue operation.
Reimplemented from ACE_Message_Queue< ACE_SYNCH_USE >.
int ACE_Dynamic_Message_Queue<>::enqueue_i | ( | ACE_Message_Block * | new_item | ) | [inline, protected, virtual] |
Enqueue an <ACE_Message_Block *> in accordance with its priority. priority may be *dynamic* or *static* or a combination or *both* It calls the priority evaluation function passed into the Dynamic Message Queue constructor to update the priorities of all enqueued messages.
Reimplemented from ACE_Message_Queue< ACE_SYNCH_USE >.
int ACE_Dynamic_Message_Queue<>::sublist_enqueue_i | ( | ACE_Message_Block * | new_item, | |
const ACE_Time_Value & | current_time, | |||
ACE_Message_Block *& | sublist_head, | |||
ACE_Message_Block *& | sublist_tail, | |||
ACE_Dynamic_Message_Strategy::Priority_Status | status | |||
) | [inline, protected, virtual] |
Enqueue a message in priority order within a given priority status sublist.
int ACE_Dynamic_Message_Queue<>::dequeue_head_i | ( | ACE_Message_Block *& | first_item | ) | [inline, protected, virtual] |
Dequeue and return the <ACE_Message_Block *> at the head of the logical queue. Attempts first to dequeue from the pending portion of the queue, or if that is empty from the late portion, or if that is empty from the beyond late portion, or if that is empty just sets the passed pointer to zero and returns -1.
Reimplemented from ACE_Message_Queue< ACE_SYNCH_USE >.
int ACE_Dynamic_Message_Queue<>::refresh_queue | ( | const ACE_Time_Value & | current_time | ) | [inline, protected, virtual] |
Refresh the queue using the strategy specific priority status function.
int ACE_Dynamic_Message_Queue<>::refresh_pending_queue | ( | const ACE_Time_Value & | current_time | ) | [inline, protected, virtual] |
Refresh the pending queue using the strategy specific priority status function.
int ACE_Dynamic_Message_Queue<>::refresh_late_queue | ( | const ACE_Time_Value & | current_time | ) | [inline, protected, virtual] |
Refresh the late queue using the strategy specific priority status function.
void ACE_Dynamic_Message_Queue<>::operator= | ( | const ACE_Dynamic_Message_Queue< _ACE_SYNCH > & | ) | [private] |
int ACE_Dynamic_Message_Queue<>::peek_dequeue_head | ( | ACE_Message_Block *& | first_item, | |
ACE_Time_Value * | timeout = 0 | |||
) | [inline, private, virtual] |
Private method to hide public base class method: just calls base class method.
Reimplemented from ACE_Message_Queue< ACE_SYNCH_USE >.
ACE_Dynamic_Message_Queue<>::ACE_ALLOC_HOOK_DECLARE |
ACE_Message_Block* ACE_Dynamic_Message_Queue<>::pending_head_ [protected] |
Pointer to head of the pending messages.
ACE_Message_Block* ACE_Dynamic_Message_Queue<>::pending_tail_ [protected] |
Pointer to tail of the pending messages.
ACE_Message_Block* ACE_Dynamic_Message_Queue<>::late_head_ [protected] |
Pointer to head of the late messages.
ACE_Message_Block* ACE_Dynamic_Message_Queue<>::late_tail_ [protected] |
Pointer to tail of the late messages.
ACE_Message_Block* ACE_Dynamic_Message_Queue<>::beyond_late_head_ [protected] |
Pointer to head of the beyond late messages.
ACE_Message_Block* ACE_Dynamic_Message_Queue<>::beyond_late_tail_ [protected] |
Pointer to tail of the beyond late messages.
ACE_Dynamic_Message_Strategy& ACE_Dynamic_Message_Queue<>::message_strategy_ [protected] |
Pointer to a dynamic priority evaluation function.