ACE_RMCast_Reordering Class Reference

Pass messages up in sent order. More...

#include <RMCast_Reordering.h>

Inheritance diagram for ACE_RMCast_Reordering:

Inheritance graph
[legend]
Collaboration diagram for ACE_RMCast_Reordering:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ACE_RB_Tree< ACE_UINT32,
ACE_RMCast::Data, ACE_Less_Than<
ACE_UINT32 >, ACE_Null_Mutex
Messages
 Use a Red-Black Tree to keep the queue of messages.
typedef ACE_RB_Tree_Iterator<
ACE_UINT32, ACE_RMCast::Data,
ACE_Less_Than< ACE_UINT32 >,
ACE_Null_Mutex
Messages_Iterator
 Use a Red-Black Tree to keep the queue of messages.

Public Member Functions

 ACE_RMCast_Reordering (void)
 Constructor.
virtual ~ACE_RMCast_Reordering (void)
 Destructor.
virtual int close (void)
 Remove messages still pending.
virtual int data (ACE_RMCast::Data &)
 Process a Data message.
virtual int ack_join (ACE_RMCast::Ack_Join &)

Protected Attributes

Messages messages_
 The reordering buffer.
ACE_UINT32 next_expected_
 The smallest value of next_expected for all the proxies.
ACE_UINT32 highest_received_
 The highest value of highest_received for all the proxies.
ACE_SYNCH_MUTEX mutex_
 Synchronization.

Private Member Functions

int push_queued_messages (void)
 Push any messages that are pending in the queue.

Detailed Description

Pass messages up in sent order.

Some applications require receivers to process messages in the same order that messages are sent. This module buffers out of order messages and only delivers a message if:

The module also sends the Ack feedback to the sender.

NOTE: This is not the same as causal or total ordering, that could be implemented someday, but requires a lot more than what we have right now.


Member Typedef Documentation

typedef ACE_RB_Tree<ACE_UINT32,ACE_RMCast::Data,ACE_Less_Than<ACE_UINT32>,ACE_Null_Mutex> ACE_RMCast_Reordering::Messages
 

Use a Red-Black Tree to keep the queue of messages.

typedef ACE_RB_Tree_Iterator<ACE_UINT32,ACE_RMCast::Data,ACE_Less_Than<ACE_UINT32>,ACE_Null_Mutex> ACE_RMCast_Reordering::Messages_Iterator
 

Use a Red-Black Tree to keep the queue of messages.


Constructor & Destructor Documentation

ACE_INLINE ACE_RMCast_Reordering::ACE_RMCast_Reordering void   ) 
 

Constructor.

ACE_RMCast_Reordering::~ACE_RMCast_Reordering void   )  [virtual]
 

Destructor.


Member Function Documentation

int ACE_RMCast_Reordering::ack_join ACE_RMCast::Ack_Join  )  [virtual]
 

During the join process the server informs us of the next expected message

Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_Reordering::close void   )  [virtual]
 

Remove messages still pending.

Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_Reordering::data ACE_RMCast::Data  )  [virtual]
 

Process a Data message.

Process a Data message, sending the right Ack message back. The message is passed up only if it is in order.

Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_Reordering::push_queued_messages void   )  [private]
 

Push any messages that are pending in the queue.


Member Data Documentation

ACE_UINT32 ACE_RMCast_Reordering::highest_received_ [protected]
 

The highest value of highest_received for all the proxies.

Messages ACE_RMCast_Reordering::messages_ [protected]
 

The reordering buffer.

ACE_SYNCH_MUTEX ACE_RMCast_Reordering::mutex_ [protected]
 

Synchronization.

ACE_UINT32 ACE_RMCast_Reordering::next_expected_ [protected]
 

The smallest value of next_expected for all the proxies.


The documentation for this class was generated from the following files:
Generated on Wed Nov 23 15:54:24 2005 for ACE_RMCast by  doxygen 1.4.5