#include <RMCast_Membership.h>
Inheritance diagram for ACE_RMCast_Membership:
Public Methods | |||
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
| |||
ACE_UINT32 | highest_received_ | ||
The highest value of
| |||
ACE_SYNCH_MUTEX | mutex_ | ||
Synchronization. | |||
Private Methods | |||
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. |
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.
|
Use an unbounded set to maintain the collection of proxies.
|
|
|
|
Constructor.
|
|
Destructor.
|
|
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. |
|
Compute an Ack message to propagate to the upper layers.
|
|
Generate an Ack message, normally due to changes in the collection, such as new proxys joining or leaving |
|
Return 1 if there are still members in the group.
|
|
Add a new member to the collection, using the <source> field in the Join message Reimplemented from ACE_RMCast_Module. |
|
Remove a member from the collection, using the <source> field in the Join message Reimplemented from ACE_RMCast_Module. |
|
The highest value of
|
|
Synchronization.
|
|
The smallest value of
|
|
The collection of proxies.
|