TRANSIENT and PERSISTENT DURABILITY implementations..
More...
#include <DataDurabilityCache.h>
Collaboration diagram for OpenDDS::DCPS::DataDurabilityCache:

Public Types | |
| typedef DurabilityArray< DurabilityQueue< sample_data_type > * > | sample_list_type |
| typedef ACE_Hash_Map_With_Allocator< key_type, sample_list_type * > | sample_map_type |
| typedef std::list< long > | timer_id_list_type |
Public Member Functions | |
| DataDurabilityCache (::DDS::DurabilityQosPolicyKind kind) | |
| Constructor. | |
| ~DataDurabilityCache () | |
| Destructor. | |
| bool | insert (::DDS::DomainId_t domain_id, char const *topic_name, char const *type_name, DataSampleList &the_data,::DDS::DurabilityServiceQosPolicy const &qos) |
| bool | get_data (::DDS::DomainId_t domain_id, char const *topic_name, char const *type_name, DataWriterImpl *data_writer, ACE_Allocator *mb_allocator, ACE_Allocator *db_allocator,::DDS::LifespanQosPolicy const &) |
Private Member Functions | |
| DataDurabilityCache (DataDurabilityCache const &) | |
| DataDurabilityCache & | operator= (DataDurabilityCache const &) |
Static Private Member Functions | |
| static std::auto_ptr< ACE_Allocator > | make_allocator (::DDS::DurabilityQosPolicyKind kind) |
Private Attributes | |
| std::auto_ptr< ACE_Allocator > const | allocator_ |
| Allocator used to allocate memory for sample map and lists. | |
| sample_map_type * | samples_ |
| Map of all data samples. | |
| timer_id_list_type | cleanup_timer_ids_ |
| Timer ID list. | |
| ACE_SYNCH_MUTEX | lock_ |
| Lock for synchronized access to the underlying map. | |
| ACE_Reactor * | reactor_ |
| Reactor with which cleanup timers will be registered. | |
Classes | |
| class | key_type |
| Key type for underlying maps. More... | |
| class | sample_data_type |
| Sample list data type for all samples. More... | |
TRANSIENT and PERSISTENT DURABILITY implementations..
This class implements a cache that outlives DataWriters.
| typedef DurabilityArray< DurabilityQueue<sample_data_type> *> OpenDDS::DCPS::DataDurabilityCache::sample_list_type |
| typedef ACE_Hash_Map_With_Allocator<key_type, sample_list_type *> OpenDDS::DCPS::DataDurabilityCache::sample_map_type |
| typedef std::list<long> OpenDDS::DCPS::DataDurabilityCache::timer_id_list_type |
| OpenDDS::DCPS::DataDurabilityCache::DataDurabilityCache | ( | ::DDS::DurabilityQosPolicyKind | kind | ) |
Constructor.
| OpenDDS::DCPS::DataDurabilityCache::~DataDurabilityCache | ( | ) |
Destructor.
| OpenDDS::DCPS::DataDurabilityCache::DataDurabilityCache | ( | DataDurabilityCache const & | ) | [private] |
| bool OpenDDS::DCPS::DataDurabilityCache::get_data | ( | ::DDS::DomainId_t | domain_id, | |
| char const * | topic_name, | |||
| char const * | type_name, | |||
| DataWriterImpl * | data_writer, | |||
| ACE_Allocator * | mb_allocator, | |||
| ACE_Allocator * | db_allocator, | |||
| ::DDS::LifespanQosPolicy const & | ||||
| ) |
Write cached data corresponding to given domain, topic and type to DataWriter.
| bool OpenDDS::DCPS::DataDurabilityCache::insert | ( | ::DDS::DomainId_t | domain_id, | |
| char const * | topic_name, | |||
| char const * | type_name, | |||
| DataSampleList & | the_data, | |||
| ::DDS::DurabilityServiceQosPolicy const & | qos | |||
| ) |
Insert the samples corresponding to the given topic instance (uniquely identify by its domain, topic name and type name) into the data durability cache.
| std::auto_ptr< ACE_Allocator > OpenDDS::DCPS::DataDurabilityCache::make_allocator | ( | ::DDS::DurabilityQosPolicyKind | kind | ) | [static, private] |
Make allocator suitable to support specified kind of DURABILITY.
| DataDurabilityCache& OpenDDS::DCPS::DataDurabilityCache::operator= | ( | DataDurabilityCache const & | ) | [private] |
std::auto_ptr<ACE_Allocator> const OpenDDS::DCPS::DataDurabilityCache::allocator_ [private] |
Allocator used to allocate memory for sample map and lists.
This allocator will either be an ACE_New_Allocator for the TRANSIENT durability case or an mmap()-based allocator for PERSISTENT durability.
Timer ID list.
Keep track of cleanup timer IDs in case we need to cancel before they expire.
ACE_SYNCH_MUTEX OpenDDS::DCPS::DataDurabilityCache::lock_ [private] |
Lock for synchronized access to the underlying map.
ACE_Reactor* OpenDDS::DCPS::DataDurabilityCache::reactor_ [private] |
Reactor with which cleanup timers will be registered.
Map of all data samples.
1.4.7