RSB
0.7.0
|
Reference counting class for Spread group memberships. More...
#include <MembershipManager.h>
Public Member Functions | |
MembershipManager () | |
virtual | ~MembershipManager () |
void | join (std::string group, SpreadConnectionPtr s) |
Joins the given Spread group if not previously done and increments reference count for this group by one. | |
void | leave (std::string group, SpreadConnectionPtr s) |
Decrements the reference count for the given Spread group identifier. |
Private Attributes | |
rsc::logging::LoggerPtr | logger |
boost::recursive_mutex | groupsMutex |
boost::shared_ptr< GroupMap > | groups |
Reference counting class for Spread group memberships.
Definition at line 54 of file MembershipManager.h.
rsb::spread::MembershipManager::MembershipManager | ( | ) |
Definition at line 37 of file MembershipManager.cpp.
|
virtual |
Definition at line 43 of file MembershipManager.cpp.
void rsb::spread::MembershipManager::join | ( | std::string | group, |
SpreadConnectionPtr | s | ||
) |
Joins the given Spread group if not previously done and increments reference count for this group by one.
group | group name to join |
s | spread connection to join on |
Definition at line 46 of file MembershipManager.cpp.
References groups, groupsMutex, and logger.
void rsb::spread::MembershipManager::leave | ( | std::string | group, |
SpreadConnectionPtr | s | ||
) |
Decrements the reference count for the given Spread group identifier.
If reference count for this identifier drops to zero, the corresponding Spread group is left.
group | group name to leave |
s | spread connection to leave on |
Definition at line 69 of file MembershipManager.cpp.
References groups, groupsMutex, and logger.
|
private |
Definition at line 81 of file MembershipManager.h.
Referenced by join(), leave(), and MembershipManager().
|
private |
Definition at line 80 of file MembershipManager.h.
|
private |
Definition at line 79 of file MembershipManager.h.
Referenced by join(), leave(), and MembershipManager().