OpenDDS::DCPS::DataLinkSetMap Class Reference

#include <DataLinkSetMap.h>

Collaboration diagram for OpenDDS::DCPS::DataLinkSetMap:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DataLinkSetMap ()
virtual ~DataLinkSetMap ()
DataLinkSetfind_or_create_set (RepoId id)
DataLinkSetfind_set (RepoId id)
DataLinkSetfind_set (RepoId id, const RepoId *remoteIds, const CORBA::ULong num_targets)
int insert_link (RepoId id, DataLink *link)
 REMEMBER: This really means find_or_create_set_then_insert_link().
void release_reservations (ssize_t num_remote_ids, const RepoId *remote_ids, const RepoId local_id, DataLinkSetMap &released_locals, const bool pub_side)
void release_all_reservations ()
void remove_released (const DataLinkSetMap &released_locals)
void clear ()
 Make the map_ empty.

Private Types

typedef ACE_SYNCH_MUTEX LockType
typedef ACE_Guard< LockTypeGuardType
typedef std::map< RepoId,
DataLinkSet_rch
MapType

Private Attributes

LockType map_lock_
MapType map_

Member Typedef Documentation

typedef ACE_Guard<LockType> OpenDDS::DCPS::DataLinkSetMap::GuardType [private]

typedef ACE_SYNCH_MUTEX OpenDDS::DCPS::DataLinkSetMap::LockType [private]

typedef std::map<RepoId, DataLinkSet_rch> OpenDDS::DCPS::DataLinkSetMap::MapType [private]


Constructor & Destructor Documentation

OpenDDS::DCPS::DataLinkSetMap::DataLinkSetMap (  ) 

OpenDDS::DCPS::DataLinkSetMap::~DataLinkSetMap (  )  [virtual]


Member Function Documentation

void OpenDDS::DCPS::DataLinkSetMap::clear (  ) 

Make the map_ empty.

OpenDDS::DCPS::DataLinkSet * OpenDDS::DCPS::DataLinkSetMap::find_or_create_set ( RepoId  id  ) 

Caller responsible for reference (count) returned. Will return nil (0) for failure.

OpenDDS::DCPS::DataLinkSet * OpenDDS::DCPS::DataLinkSetMap::find_set ( RepoId  id,
const RepoId remoteIds,
const CORBA::ULong  num_targets 
)

OpenDDS::DCPS::DataLinkSet * OpenDDS::DCPS::DataLinkSetMap::find_set ( RepoId  id  ) 

Caller responsible for reference (count) returned. Will return nil (0) for failure.

int OpenDDS::DCPS::DataLinkSetMap::insert_link ( RepoId  id,
DataLink link 
)

REMEMBER: This really means find_or_create_set_then_insert_link().

This method will do the find_or_create_set(id), followed by an insert() call on the DataLinkSet (the one that was found or created for us). A -1 is returned if there are any problems. A 0 is returned to denote success. And a return code of 1 indicates that the link is already a member of the DataLinkSet associated with the key RepoId. REMEMBER: This really means find_or_create_set_then_insert_link()

void OpenDDS::DCPS::DataLinkSetMap::release_all_reservations (  ) 

Called when the TransportInterface is detaching from the TransportImpl (as opposed to the other way around when the TransportImpl is detaching from the TransportInterface).

void OpenDDS::DCPS::DataLinkSetMap::release_reservations ( ssize_t  num_remote_ids,
const RepoId remote_ids,
const RepoId  local_id,
DataLinkSetMap released_locals,
const bool  pub_side 
)

Used by the TransportInterface when this map is regarded as the "remote map".

For each remote_id in the array of remote_ids, this method will cause the remote_id/local_id DataLink be removed from remote_id's DataLinkSet if the remote_id/local_id is the last association in the DataLink, followed by informing the remote_id/local_id DataLink to release the remote_id/local_id. The DataLink will update the released_locals as it successfully handles its release_reservation() requests.

void OpenDDS::DCPS::DataLinkSetMap::remove_released ( const DataLinkSetMap released_locals  ) 

Used by the TransportInterface when this map is regarded as the "local map".

The supplied released_locals contains, for each RepoId key, the set of DataLinks that should be removed from our map_. These are removed due to a release_reservations call on our "reverse" map in the TransportInterface.


Member Data Documentation

MapType OpenDDS::DCPS::DataLinkSetMap::map_ [private]

LockType OpenDDS::DCPS::DataLinkSetMap::map_lock_ [private]


The documentation for this class was generated from the following files:
Generated on Fri Jun 20 10:21:47 2008 for OpenDDS by  doxygen 1.4.7