ldas-tools-diskcacheAPI  2.7.0
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
diskCache::MountPointManager Class Reference

Manages a collection of mount points. More...

#include <MountPointManager.hh>

Inheritance diagram for diskCache::MountPointManager:
Inheritance graph
[legend]
Collaboration diagram for diskCache::MountPointManager:
Collaboration graph
[legend]

Classes

struct  ScanResults
 Addition information regarding a scan request. More...
 
struct  UpdateResults
 Presents additional information regarding an update request. More...
 

Public Types

typedef std::list< std::string > mount_point_name_container_type
 Collection of mount point names. More...
 
typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::READ, mount_point_name_container_typemount_point_names_ro_type
 
typedef Cache::DirectoryManager directory_cache_type
 
typedef std::list< std::string > mount_point_name_container_type
 Collection of mount point names. More...
 
typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::READ, mount_point_name_container_typemount_point_names_ro_type
 
typedef Cache::DirectoryManager directory_cache_type
 
typedef std::list< std::string > mount_point_name_container_type
 Collection of mount point names. More...
 
typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::READ, mount_point_name_container_typemount_point_names_ro_type
 
typedef Cache::DirectoryManager directory_cache_type
 

Public Member Functions

 MountPointManager ()
 
void DirectoryCache (directory_cache_type *Cache)
 Establish the cache of directories. More...
 
void Find (Cache::QueryAnswer &Answer) const
 Locate files contained within the collection. More...
 
const mount_point_names_ro_type MountPoints () const
 Retrieve the names of the mount points. More...
 
Streams::IInterfaceRead (Streams::IInterface &Stream)
 Retrieve information from the stream. More...
 
void Reset (int Flag)
 Reset the requested information. More...
 
void Scan (const std::string &MountPoint, ScanResults &Results)
 Request the scanning of a single mount point. More...
 
void Update (const mount_point_name_container_type &MountPoints, UpdateResults &Results)
 Update the collection of managed mount points. More...
 
template<typename StreamT >
StreamT & Read (StreamT &Stream)
 Dump information to the stream. More...
 
template<typename OStreamT >
OStreamT & Write (OStreamT &Stream)
 Dump information to the stream. More...
 
 MountPointManager ()
 
void DirectoryCache (directory_cache_type *Cache)
 Establish the cache of directories. More...
 
void Find (Cache::QueryAnswer &Answer) const
 Locate files contained within the collection. More...
 
const mount_point_names_ro_type MountPoints () const
 Retrieve the names of the mount points. More...
 
Streams::IInterfaceRead (Streams::IInterface &Stream)
 Retrieve information from the stream. More...
 
void Reset (int Flag)
 Reset the requested information. More...
 
void Scan (const std::string &MountPoint, ScanResults &Results)
 Request the scanning of a single mount point. More...
 
void Update (const mount_point_name_container_type &MountPoints, UpdateResults &Results)
 Update the collection of managed mount points. More...
 
template<typename StreamT >
StreamT & Read (StreamT &Stream)
 Dump information to the stream. More...
 
template<typename OStreamT >
OStreamT & Write (OStreamT &Stream)
 Dump information to the stream. More...
 
 MountPointManager ()
 
void DirectoryCache (directory_cache_type *Cache)
 Establish the cache of directories. More...
 
void Find (Cache::QueryAnswer &Answer) const
 Locate files contained within the collection. More...
 
const mount_point_names_ro_type MountPoints () const
 Retrieve the names of the mount points. More...
 
Streams::IInterfaceRead (Streams::IInterface &Stream)
 Retrieve information from the stream. More...
 
void Reset (int Flag)
 Reset the requested information. More...
 
void Scan (const std::string &MountPoint, ScanResults &Results)
 Request the scanning of a single mount point. More...
 
void Update (const mount_point_name_container_type &MountPoints, UpdateResults &Results)
 Update the collection of managed mount points. More...
 
template<typename StreamT >
StreamT & Read (StreamT &Stream)
 Dump information to the stream. More...
 
template<typename OStreamT >
OStreamT & Write (OStreamT &Stream)
 Dump information to the stream. More...
 
template<>
Streams::OASCIIWrite (Streams::OASCII &Stream)
 
template<>
Streams::IBinaryRead (Streams::IBinary &Stream)
 
template<>
Streams::OBinaryWrite (Streams::OBinary &Stream)
 

Static Public Attributes

static const int RESET_CACHE = 0x0001
 Reset the cached information. More...
 
static const int RESET_MANAGED_DIRECTORIES = 0x0002
 Reset the lists of managed directories. More...
 

Private Types

typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::WRITE, mount_point_name_container_typemount_point_names_rw_type
 
typedef std::set< std::string > excluded_mount_point_names_type
 
typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::WRITE, mount_point_name_container_typemount_point_names_rw_type
 
typedef std::set< std::string > excluded_mount_point_names_type
 
typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::WRITE, mount_point_name_container_typemount_point_names_rw_type
 
typedef std::set< std::string > excluded_mount_point_names_type
 

Private Member Functions

const mount_point_names_ro_type mount_point_names_ro () const
 
mount_point_names_rw_type mount_point_names_rw ()
 
const mount_point_names_ro_type mount_point_names_ro () const
 
mount_point_names_rw_type mount_point_names_rw ()
 
const mount_point_names_ro_type mount_point_names_ro () const
 
mount_point_names_rw_type mount_point_names_rw ()
 

Private Attributes

mount_point_name_container_type m_mount_points_dictionary_order
 
mount_point_name_container_type p_mount_points_search_order
 
excluded_mount_point_names_type excluded_mount_point_names
 
mount_point_names_rw_type::baton_type p_mount_points_search_order_baton
 
directory_cache_typem_directory_cache
 

Detailed Description

Manages a collection of mount points.

A collection of mount points is managed by this singleton class. Each mount point represents a starting point for data searches. The collection of mount points is order sensative in that directories that appear higher in the list will be prioritised when searching for data.

Member Typedef Documentation

◆ directory_cache_type [1/3]

◆ directory_cache_type [2/3]

◆ directory_cache_type [3/3]

◆ excluded_mount_point_names_type [1/3]

◆ excluded_mount_point_names_type [2/3]

◆ excluded_mount_point_names_type [3/3]

◆ mount_point_name_container_type [1/3]

Collection of mount point names.

This is used to ease the management of the collection of mount points when only the name is significant. This container does not impose any particular order.

◆ mount_point_name_container_type [2/3]

Collection of mount point names.

This is used to ease the management of the collection of mount points when only the name is significant. This container does not impose any particular order.

◆ mount_point_name_container_type [3/3]

Collection of mount point names.

This is used to ease the management of the collection of mount points when only the name is significant. This container does not impose any particular order.

◆ mount_point_names_ro_type [1/3]

typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::READ, mount_point_name_container_type > diskCache::MountPointManager::mount_point_names_ro_type

◆ mount_point_names_ro_type [2/3]

typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::READ, mount_point_name_container_type > diskCache::MountPointManager::mount_point_names_ro_type

◆ mount_point_names_ro_type [3/3]

typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::READ, mount_point_name_container_type > diskCache::MountPointManager::mount_point_names_ro_type

◆ mount_point_names_rw_type [1/3]

typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::WRITE, mount_point_name_container_type > diskCache::MountPointManager::mount_point_names_rw_type
private

◆ mount_point_names_rw_type [2/3]

typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::WRITE, mount_point_name_container_type > diskCache::MountPointManager::mount_point_names_rw_type
private

◆ mount_point_names_rw_type [3/3]

typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::WRITE, mount_point_name_container_type > diskCache::MountPointManager::mount_point_names_rw_type
private

Constructor & Destructor Documentation

◆ MountPointManager() [1/3]

diskCache::MountPointManager::MountPointManager ( )

◆ MountPointManager() [2/3]

diskCache::MountPointManager::MountPointManager ( )

◆ MountPointManager() [3/3]

diskCache::MountPointManager::MountPointManager ( )

Member Function Documentation

◆ DirectoryCache() [1/3]

void diskCache::MountPointManager::DirectoryCache ( directory_cache_type Cache)
inline

Establish the cache of directories.

◆ DirectoryCache() [2/3]

void diskCache::MountPointManager::DirectoryCache ( directory_cache_type Cache)

Establish the cache of directories.

◆ DirectoryCache() [3/3]

void diskCache::MountPointManager::DirectoryCache ( directory_cache_type Cache)

Establish the cache of directories.

◆ Find() [1/3]

void diskCache::MountPointManager::Find ( Cache::QueryAnswer Answer) const

Locate files contained within the collection.

◆ Find() [2/3]

void diskCache::MountPointManager::Find ( Cache::QueryAnswer Answer) const

Locate files contained within the collection.

◆ Find() [3/3]

void diskCache::MountPointManager::Find ( Cache::QueryAnswer Answer) const

Locate files contained within the collection.

◆ mount_point_names_ro() [1/3]

const mount_point_names_ro_type diskCache::MountPointManager::mount_point_names_ro ( ) const
private

◆ mount_point_names_ro() [2/3]

const mount_point_names_ro_type diskCache::MountPointManager::mount_point_names_ro ( ) const
private

◆ mount_point_names_ro() [3/3]

const MountPointManager::mount_point_names_ro_type diskCache::MountPointManager::mount_point_names_ro ( ) const
inlineprivate

◆ mount_point_names_rw() [1/3]

mount_point_names_rw_type diskCache::MountPointManager::mount_point_names_rw ( )
private

◆ mount_point_names_rw() [2/3]

mount_point_names_rw_type diskCache::MountPointManager::mount_point_names_rw ( )
private

◆ mount_point_names_rw() [3/3]

MountPointManager::mount_point_names_rw_type diskCache::MountPointManager::mount_point_names_rw ( )
inlineprivate

◆ MountPoints() [1/3]

const mount_point_names_ro_type diskCache::MountPointManager::MountPoints ( ) const

Retrieve the names of the mount points.

◆ MountPoints() [2/3]

const MountPointManager::mount_point_names_ro_type diskCache::MountPointManager::MountPoints ( ) const
inline

Retrieve the names of the mount points.

◆ MountPoints() [3/3]

const mount_point_names_ro_type diskCache::MountPointManager::MountPoints ( ) const

Retrieve the names of the mount points.

◆ Read() [1/7]

template<>
Streams::IBinary& diskCache::MountPointManager::Read ( Streams::IBinary Stream)

Handles writing of a single collection of mount points to a binary stream.

◆ Read() [2/7]

Streams::IInterface & diskCache::MountPointManager::Read ( Streams::IInterface Stream)

Retrieve information from the stream.

Parameters
[in]StreamSource of the new information.
Todo:
Place into the mount point list

◆ Read() [3/7]

Streams::IInterface& diskCache::MountPointManager::Read ( Streams::IInterface Stream)

Retrieve information from the stream.

Parameters
[in]StreamSource of the new information.

◆ Read() [4/7]

Streams::IInterface& diskCache::MountPointManager::Read ( Streams::IInterface Stream)

Retrieve information from the stream.

Parameters
[in]StreamSource of the new information.

◆ Read() [5/7]

template<typename StreamT >
StreamT& diskCache::MountPointManager::Read ( StreamT &  Stream)

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Read() [6/7]

template<typename StreamT >
StreamT& diskCache::MountPointManager::Read ( StreamT &  Stream)

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Read() [7/7]

template<typename StreamT >
StreamT& diskCache::MountPointManager::Read ( StreamT &  Stream)

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Reset() [1/3]

void diskCache::MountPointManager::Reset ( int  Flag)

Reset the requested information.

This allows for the purging of certain information so as to force a refreshing of the information.

Parameters
[in]FlagThis is an ORed flag indicating what should be cleaned

◆ Reset() [2/3]

void diskCache::MountPointManager::Reset ( int  Flag)

Reset the requested information.

This allows for the purging of certain information so as to force a refreshing of the information.

Parameters
[in]FlagThis is an ORed flag indicating what should be cleaned

◆ Reset() [3/3]

void diskCache::MountPointManager::Reset ( int  Flag)

Reset the requested information.

This allows for the purging of certain information so as to force a refreshing of the information.

Parameters
[in]FlagThis is an ORed flag indicating what should be cleaned

◆ Scan() [1/3]

void diskCache::MountPointManager::Scan ( const std::string &  MountPoint,
ScanResults Results 
)

Request the scanning of a single mount point.

This does a deep scan of the requested mount point.

Parameters
[in]MountPointThe name of the mount point to scan.
[out]ResultsInformation gathered during the scan.

◆ Scan() [2/3]

void diskCache::MountPointManager::Scan ( const std::string &  MountPoint,
ScanResults Results 
)

Request the scanning of a single mount point.

Parameters
[in]MountPointThe name of the mount point to scan.
[out]ResultsInformation gathered during the scan.

◆ Scan() [3/3]

void diskCache::MountPointManager::Scan ( const std::string &  MountPoint,
ScanResults Results 
)

Request the scanning of a single mount point.

Parameters
[in]MountPointThe name of the mount point to scan.
[out]ResultsInformation gathered during the scan.

◆ Update() [1/3]

void diskCache::MountPointManager::Update ( const mount_point_name_container_type MountPoints,
UpdateResults Results 
)

Update the collection of managed mount points.

Parameters
[in]MountPointsOrdered collection of mount points to be managed.
[out]ResultsResults.

◆ Update() [2/3]

void diskCache::MountPointManager::Update ( const mount_point_name_container_type MountPoints,
UpdateResults Results 
)

Update the collection of managed mount points.

Parameters
[in]MountPointsOrdered collection of mount points to be managed.
[out]ResultsResults.

◆ Update() [3/3]

void diskCache::MountPointManager::Update ( const mount_point_name_container_type MountPoints,
UpdateResults Results 
)

Update the collection of managed mount points.

Parameters
[in]MountPointsOrdered collection of mount points to be managed.
[out]ResultsResults.

◆ Write() [1/5]

template<>
Streams::OASCII& diskCache::MountPointManager::Write ( Streams::OASCII Stream)

Handles writing of a single collection of mount points to a binary stream.

◆ Write() [2/5]

template<>
Streams::OBinary& diskCache::MountPointManager::Write ( Streams::OBinary Stream)

Handles writing of a single collection of mount points to a binary stream.

◆ Write() [3/5]

template<typename OStreamT >
OStreamT& diskCache::MountPointManager::Write ( OStreamT &  Stream)

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Write() [4/5]

template<typename OStreamT >
OStreamT& diskCache::MountPointManager::Write ( OStreamT &  Stream)

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Write() [5/5]

template<typename OStreamT >
OStreamT& diskCache::MountPointManager::Write ( OStreamT &  Stream)

Dump information to the stream.

Parameters
[in]StreamSink for the information.

Member Data Documentation

◆ excluded_mount_point_names

excluded_mount_point_names_type diskCache::MountPointManager::excluded_mount_point_names
private

◆ m_directory_cache

directory_cache_type * diskCache::MountPointManager::m_directory_cache
private

◆ m_mount_points_dictionary_order

mount_point_name_container_type diskCache::MountPointManager::m_mount_points_dictionary_order
private

◆ p_mount_points_search_order

mount_point_name_container_type diskCache::MountPointManager::p_mount_points_search_order
private

◆ p_mount_points_search_order_baton

mount_point_names_rw_type::baton_type diskCache::MountPointManager::p_mount_points_search_order_baton
mutableprivate

◆ RESET_CACHE

static const int diskCache::MountPointManager::RESET_CACHE = 0x0001
static

Reset the cached information.

◆ RESET_MANAGED_DIRECTORIES

static const int diskCache::MountPointManager::RESET_MANAGED_DIRECTORIES = 0x0002
static

Reset the lists of managed directories.


The documentation for this class was generated from the following files: