ldas-tools-diskcacheAPI
2.5.6
|
Manages a collection of mount points. More...
#include <MountPointManager.hh>
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_type > | mount_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::IInterface & | Read (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::OASCII & | Write (Streams::OASCII &Stream) |
template<> | |
Streams::IBinary & | Read (Streams::IBinary &Stream) |
template<> | |
Streams::OBinary & | Write (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... | |
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.
typedef std::list< std::string > diskCache::MountPointManager::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.
typedef LDASTools::AL::ReadWriteLockVariable< LDASTools::AL::ReadWriteLock::READ, mount_point_name_container_type > diskCache::MountPointManager::mount_point_names_ro_type |
diskCache::MountPointManager::MountPointManager | ( | ) |
|
inline |
Establish the cache of directories.
void diskCache::MountPointManager::Find | ( | Cache::QueryAnswer & | Answer | ) | const |
Locate files contained within the collection.
|
inline |
Retrieve the names of the mount points.
Streams::IBinary& diskCache::MountPointManager::Read | ( | Streams::IBinary & | Stream | ) |
Handles writing of a single collection of mount points to a binary stream.
Streams::IInterface & diskCache::MountPointManager::Read | ( | Streams::IInterface & | Stream | ) |
Retrieve information from the stream.
[in] | Stream | Source of the new information. |
StreamT& diskCache::MountPointManager::Read | ( | StreamT & | Stream | ) |
Dump information to the stream.
[in] | Stream | Sink for the information. |
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.
[in] | Flag | This is an ORed flag indicating what should be cleaned |
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.
[in] | MountPoint | The name of the mount point to scan. |
[out] | Results | Information gathered during the scan. |
void diskCache::MountPointManager::Update | ( | const mount_point_name_container_type & | MountPoints, |
UpdateResults & | Results | ||
) |
Update the collection of managed mount points.
[in] | MountPoints | Ordered collection of mount points to be managed. |
[out] | Results | Results. |
Streams::OASCII& diskCache::MountPointManager::Write | ( | Streams::OASCII & | Stream | ) |
Handles writing of a single collection of mount points to a binary stream.
Streams::OBinary& diskCache::MountPointManager::Write | ( | Streams::OBinary & | Stream | ) |
Handles writing of a single collection of mount points to a binary stream.
OStreamT& diskCache::MountPointManager::Write | ( | OStreamT & | Stream | ) |
Dump information to the stream.
[in] | Stream | Sink for the information. |
|
static |
Reset the cached information.
|
static |
Reset the lists of managed directories.