DataDurabilityCache.cpp File Reference

#include "DCPS/DdsDcps_pch.h"
#include "ace/Condition_Recursive_Thread_Mutex.h"
#include "DataDurabilityCache.h"
#include "Service_Participant.h"
#include "SendStateDataSampleList.h"
#include "DataSampleElement.h"
#include "WriteDataContainer.h"
#include "DataWriterImpl.h"
#include "Qos_Helper.h"
#include "debug.h"
#include "SafetyProfileStreams.h"
#include "tao/ORB_Core.h"
#include "ace/Reactor.h"
#include "ace/Message_Block.h"
#include "ace/Log_Msg.h"
#include "ace/Malloc_T.h"
#include "ace/MMAP_Memory_Pool.h"
#include "ace/OS_NS_sys_time.h"
#include <fstream>
#include <algorithm>

Include dependency graph for DataDurabilityCache.cpp:

Go to the source code of this file.

Defines

#define OPENDDS_MAP_TYPE   ACE_Hash_Map_With_Allocator<key_type, sample_list_type *>

Typedefs

typedef OpenDDS::DCPS::DataDurabilityCache::sample_data_type data_type
typedef OpenDDS::DCPS::DataDurabilityCache::sample_list_type list_type
typedef ptrdiff_t list_difference_type

Functions

void cleanup_directory (const OPENDDS_VECTOR(OPENDDS_STRING)&path, const ACE_CString &data_dir)

Variables

list_typesample_list_
list_difference_type const index_
 Location in list/array of queue to be deallocated.
ACE_Allocator *const allocator_
 Allocator to be used when deallocating data queue.
long tid_
 Timer ID corresponding to this cleanup event handler.
OpenDDS::DCPS::DataDurabilityCache::timer_id_list_type * timer_ids_
 List of timer IDs.
ACE_CString data_dir_


Define Documentation

#define OPENDDS_MAP_TYPE   ACE_Hash_Map_With_Allocator<key_type, sample_list_type *>

Referenced by OpenDDS::DCPS::DataDurabilityCache::~DataDurabilityCache().


Typedef Documentation

typedef OpenDDS::DCPS::DataDurabilityCache::sample_data_type data_type

Definition at line 67 of file DataDurabilityCache.cpp.

typedef ptrdiff_t list_difference_type

Definition at line 70 of file DataDurabilityCache.cpp.

typedef OpenDDS::DCPS::DataDurabilityCache::sample_list_type list_type

Definition at line 69 of file DataDurabilityCache.cpp.


Function Documentation

void @1::cleanup_directory ( const OPENDDS_VECTOR(OPENDDS_STRING)&  path,
const ACE_CString &  data_dir 
) [static]

Definition at line 37 of file DataDurabilityCache.cpp.

Referenced by OpenDDS::DCPS::DataDurabilityCache::get_data().

00039 {
00040   if (path.empty()) return;
00041 
00042   using OpenDDS::FileSystemStorage::Directory;
00043   Directory::Ptr dir = Directory::create(data_dir.c_str());
00044   dir = dir->get_dir(path);
00045   Directory::Ptr parent = dir->parent();
00046   dir->remove();
00047 
00048   // clean up empty directories
00049   while (!parent.is_nil() &&
00050          (parent->begin_dirs() == parent->end_dirs())) {
00051     Directory::Ptr to_delete = parent;
00052     parent = parent->parent();
00053     to_delete->remove();
00054   }
00055 }


Variable Documentation

ACE_Allocator* const allocator_

Allocator to be used when deallocating data queue.

Definition at line 146 of file DataDurabilityCache.cpp.

Referenced by OpenDDS::DCPS::RcObject< ACE_SYNCH_MUTEX >::_remove_ref(), OpenDDS::DCPS::TransportCustomizedElement::allocator(), OpenDDS::DCPS::DurabilityQueue< T >::set_allocator(), and OpenDDS::DCPS::DurabilityArray< T >::set_allocator().

ACE_CString data_dir_

Definition at line 163 of file DataDurabilityCache.cpp.

list_difference_type const index_

Location in list/array of queue to be deallocated.

Definition at line 143 of file DataDurabilityCache.cpp.

list_type& sample_list_

List containing samples to be cleaned up when the cleanup timer expires.

Definition at line 140 of file DataDurabilityCache.cpp.

long tid_

Timer ID corresponding to this cleanup event handler.

Definition at line 149 of file DataDurabilityCache.cpp.

OpenDDS::DCPS::DataDurabilityCache::timer_id_list_type* timer_ids_

List of timer IDs.

If the cleanup timer fires successfully, the timer ID must be removed from the timer ID list so that a subsequent attempt to cancel the timer during durability cache destruction does not occur.

Definition at line 159 of file DataDurabilityCache.cpp.


Generated on Fri Feb 12 20:05:31 2016 for OpenDDS by  doxygen 1.4.7