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

Manages a collection of mount points. More...

#include <MountPointManager.hh>

Inheritance diagram for diskCache::MountPointManager:
diskCache::MountPointManagerSingleton

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
 

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...
 
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...
 

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

◆ mount_point_name_container_type

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

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

Constructor & Destructor Documentation

◆ MountPointManager()

diskCache::MountPointManager::MountPointManager ( )

Member Function Documentation

◆ DirectoryCache()

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

Establish the cache of directories.

◆ Find()

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

Locate files contained within the collection.

◆ MountPoints()

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

Retrieve the names of the mount points.

◆ Read() [1/3]

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

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

◆ Read() [2/3]

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

Retrieve information from the stream.

Parameters
[in]StreamSource of the new information.

◆ Read() [3/3]

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

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Reset()

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()

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.

◆ Update()

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/3]

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

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

◆ Write() [2/3]

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

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

◆ Write() [3/3]

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

Dump information to the stream.

Parameters
[in]StreamSink for the information.

Member Data Documentation

◆ RESET_CACHE

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

Reset the cached information.

◆ RESET_MANAGED_DIRECTORIES

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: