ACE_RMCast_Membership Class Reference

Track peer membership. More...

#include <RMCast_Membership.h>

Inheritance diagram for ACE_RMCast_Membership:

Inheritance graph
[legend]
Collaboration diagram for ACE_RMCast_Membership:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_RMCast_Membership (void)
 Constructor.
virtual ~ACE_RMCast_Membership (void)
 Destructor.
int has_members (void)
 Return 1 if there are still members in the group.
virtual int ack (ACE_RMCast::Ack &)
 Receive an process an Ack message.
virtual int join (ACE_RMCast::Join &)
virtual int leave (ACE_RMCast::Leave &)

Protected Types

typedef ACE_Unbounded_Set<
ACE_RMCast_Proxy * > 
Proxy_Collection
 Use an unbounded set to maintain the collection of proxies.
typedef ACE_Unbounded_Set_Iterator<
ACE_RMCast_Proxy * > 
Proxy_Iterator

Protected Attributes

Proxy_Collection proxies_
 The collection of proxies.
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 generate_ack (ACE_RMCast_Proxy *proxy)
int compute_ack_i (ACE_RMCast_Proxy *source, ACE_RMCast::Ack &next_ack)
 Compute an Ack message to propagate to the upper layers.

Detailed Description

Track peer membership.

Reliable senders of events need to know exactly how many peers are receiving the events, and how many events has each peer received so far. This class uses the Join, Leave and Ack messages to build that information, it also summarizes the Ack events and propagate only the global info to the upper layer.


Member Typedef Documentation

typedef ACE_Unbounded_Set<ACE_RMCast_Proxy*> ACE_RMCast_Membership::Proxy_Collection [protected]
 

Use an unbounded set to maintain the collection of proxies.

typedef ACE_Unbounded_Set_Iterator<ACE_RMCast_Proxy*> ACE_RMCast_Membership::Proxy_Iterator [protected]
 


Constructor & Destructor Documentation

ACE_INLINE ACE_RMCast_Membership::ACE_RMCast_Membership void   ) 
 

Constructor.

ACE_RMCast_Membership::~ACE_RMCast_Membership void   )  [virtual]
 

Destructor.


Member Function Documentation

int ACE_RMCast_Membership::ack ACE_RMCast::Ack  )  [virtual]
 

Receive an process an Ack message.

After receiving the Ack message we find out what is the lowest sequence number received in order among all the acks received by the proxies in the collection. We also find out what is the highest sequence number received by any proxy. We only propagate that information back to the upper layer, and then only if there are any news since the last Ack.

Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_Membership::compute_ack_i ACE_RMCast_Proxy source,
ACE_RMCast::Ack next_ack
[private]
 

Compute an Ack message to propagate to the upper layers.

int ACE_RMCast_Membership::generate_ack ACE_RMCast_Proxy proxy  )  [private]
 

Generate an Ack message, normally due to changes in the collection, such as new proxys joining or leaving

int ACE_RMCast_Membership::has_members void   ) 
 

Return 1 if there are still members in the group.

int ACE_RMCast_Membership::join ACE_RMCast::Join  )  [virtual]
 

Add a new member to the collection, using the <source> field in the Join message

Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_Membership::leave ACE_RMCast::Leave  )  [virtual]
 

Remove a member from the collection, using the <source> field in the Join message

Reimplemented from ACE_RMCast_Module.


Member Data Documentation

ACE_UINT32 ACE_RMCast_Membership::highest_received_ [protected]
 

The highest value of highest_received for all the proxies.

ACE_SYNCH_MUTEX ACE_RMCast_Membership::mutex_ [protected]
 

Synchronization.

ACE_UINT32 ACE_RMCast_Membership::next_expected_ [protected]
 

The smallest value of next_expected for all the proxies.

Proxy_Collection ACE_RMCast_Membership::proxies_ [protected]
 

The collection of proxies.


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