ACE_Deadline_Message_Strategy Class Reference

Deadline based message priority strategy. More...

#include <Message_Block.h>

Inheritance diagram for ACE_Deadline_Message_Strategy:

Inheritance graph
Collaboration diagram for ACE_Deadline_Message_Strategy:

Collaboration graph
List of all members.

Public Member Functions

 ACE_Deadline_Message_Strategy (unsigned long static_bit_field_mask=0x3FFUL, unsigned long static_bit_field_shift=10, unsigned long dynamic_priority_max=0x3FFFFFUL, unsigned long dynamic_priority_offset=0x200000UL)
 Ctor, with all arguments defaulted.

virtual ~ACE_Deadline_Message_Strategy (void)
 Virtual dtor.

virtual void convert_priority (ACE_Time_Value &priority, const ACE_Message_Block &mb)
 Dynamic priority conversion function based on time to deadline.

virtual void dump (void) const
 Dump the state of the strategy.

Detailed Description

Deadline based message priority strategy.

Assigns dynamic message priority according to time to deadline. The message priority is divided into high and low order bit fields. The high order bit field is used for dynamic message priority, which is updated whenever the convert_priority() method is called. The low order bit field is used for static message priority and is left unchanged. The partitioning of the priority value into high and low order bit fields is done according to the arguments passed to the strategy object's constructor.

Definition at line 983 of file Message_Block.h.

Constructor & Destructor Documentation

ACE_Deadline_Message_Strategy::ACE_Deadline_Message_Strategy unsigned long  static_bit_field_mask = 0x3FFUL,
unsigned long  static_bit_field_shift = 10,
unsigned long  dynamic_priority_max = 0x3FFFFFUL,
unsigned long  dynamic_priority_offset = 0x200000UL

Ctor, with all arguments defaulted.

Definition at line 1285 of file Message_Block.cpp.

01289   : ACE_Dynamic_Message_Strategy (static_bit_field_mask,
01290                                   static_bit_field_shift,
01291                                   dynamic_priority_max,
01292                                   dynamic_priority_offset)
01293 {
01294 }

ACE_Deadline_Message_Strategy::~ACE_Deadline_Message_Strategy void   )  [virtual]

Virtual dtor.

Definition at line 1296 of file Message_Block.cpp.

01297 {
01298 }

Member Function Documentation

void ACE_Deadline_Message_Strategy::convert_priority ACE_Time_Value priority,
const ACE_Message_Block mb

Dynamic priority conversion function based on time to deadline.

Implements ACE_Dynamic_Message_Strategy.

Definition at line 1301 of file Message_Block.cpp.

References ACE_Message_Block::msg_deadline_time().

01303 {
01304   // Convert absolute time passed in tv to negative time
01305   // to deadline of mb with respect to that absolute time.
01306   priority -= mb.msg_deadline_time ();
01307 }

void ACE_Deadline_Message_Strategy::dump void   )  const [virtual]

Dump the state of the strategy.

Reimplemented from ACE_Dynamic_Message_Strategy.

Definition at line 1311 of file Message_Block.cpp.

References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, ACE_Dynamic_Message_Strategy::dump(), and LM_DEBUG.

01312 {
01313 #if defined (ACE_HAS_DUMP)
01314   ACE_TRACE ("ACE_Deadline_Message_Strategy::dump");
01318   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
01319   this->ACE_Dynamic_Message_Strategy::dump ();
01321   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nderived class: ACE_Deadline_Message_Strategy\n")));
01324 #endif /* ACE_HAS_DUMP */
01325 }

The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:21:18 2006 for ACE by doxygen 1.3.6