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

Manages a collection of mount points. More...

#include <DirectoryManagerSingleton.hh>

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

Public Types

typedef Cache::DirectoryManager::directory_ref_type directory_ref_type
 
typedef Cache::DirectoryManager::directory_ref_type directory_ref_type
 
typedef Cache::DirectoryManager::directory_ref_type directory_ref_type
 

Public Member Functions

 DECLARE_READ_WRITE_SINGLETON (DirectoryManagerSingleton)
 
 DECLARE_READ_WRITE_SINGLETON (DirectoryManagerSingleton)
 
 DECLARE_READ_WRITE_SINGLETON (DirectoryManagerSingleton)
 

Static Public Member Functions

static bool AddDirectory (directory_ref_type Directory)
 
static void Find (const std::string &Root, Cache::QueryAnswer &Answer)
 
static void RemoveDirectoryRecursively (const std::string &Name)
 Remove a directory from the collection. More...
 
static void Scan (const std::string &Root, ScanResults &Results)
 Recursively scan a managed directory. More...
 
template<typename StreamT >
static StreamT & Read (StreamT &Stream)
 Initialize information from the stream. More...
 
template<typename OStreamT >
static OStreamT & Write (OStreamT &Stream)
 Dump information to the stream. More...
 
static bool AddDirectory (directory_ref_type Directory)
 
static void Find (const std::string &Root, Cache::QueryAnswer &Answer)
 
static void RemoveDirectoryRecursively (const std::string &Name)
 Remove a directory from the collection. More...
 
static void Scan (const std::string &Root, ScanResults &Results)
 Recursively scan a managed directory. More...
 
template<typename StreamT >
static StreamT & Read (StreamT &Stream)
 Initialize information from the stream. More...
 
template<typename OStreamT >
static OStreamT & Write (OStreamT &Stream)
 Dump information to the stream. More...
 
static bool AddDirectory (directory_ref_type Directory)
 
static void Find (const std::string &Root, Cache::QueryAnswer &Answer)
 
static void RemoveDirectoryRecursively (const std::string &Name)
 Remove a directory from the collection. More...
 
static void Scan (const std::string &Root, ScanResults &Results)
 Recursively scan a managed directory. More...
 
template<typename StreamT >
static StreamT & Read (StreamT &Stream)
 Initialize information from the stream. More...
 
template<typename OStreamT >
static OStreamT & Write (OStreamT &Stream)
 Dump information to the stream. More...
 

Private Types

typedef Directory::ScanResults ScanResults
 
typedef Directory::ScanResults ScanResults
 
typedef Directory::ScanResults ScanResults
 

Private Member Functions

void CreateDirectory (const std::string &Name, const std::string &Root)
 Create a new directory to be added to the collection. More...
 
void CreateDirectory (const std::string &Name, const std::string &Root)
 Create a new directory to be added to the collection. More...
 
void CreateDirectory (const std::string &Name, const std::string &Root)
 Create a new directory to be added to the collection. More...
 
void Find (const std::string &Root, QueryAnswer &Answer) const
 Locate files. More...
 
void OnUpdate (directory_ref_type Dir, ScanResults &Results)
 Update information concearning a single directory. More...
 
void OnUpdate (directory_ref_type Dir, ScanResults &Results)
 Update information concearning a single directory. More...
 
void OnUpdate (directory_ref_type Dir, ScanResults &Results)
 Update information concearning a single directory. More...
 
directory_ref_type ReferenceDirectory (const std::string &Name) const
 Locate a directory in the collection. More...
 
directory_ref_type ReferenceDirectory (const std::string &Name) const
 Locate a directory in the collection. More...
 
directory_ref_type ReferenceDirectory (const std::string &Name) const
 Locate a directory in the collection. More...
 
void RemoveDirectory (const std::string &Name)
 Remove a directory from the collection. More...
 
void RemoveDirectory (const std::string &Name)
 Remove a directory from the collection. More...
 
void RemoveDirectory (const std::string &Name)
 Remove a directory from the collection. More...
 
template<>
IBinary & Read (IBinary &Stream)
 
void Scan (directory_ref_type Dir, ScanResults &Results)
 Scan the directory for changes. More...
 
template<typename StreamT >
StreamT & Write (StreamT &Stream)
 
template<>
OStream & Write (OStream &Stream)
 
template<>
OBinary & Write (OBinary &Stream)
 
template<class Op >
void Walk (Op Operation, const std::string &Root, bool IncludeOffline=false)
 Walk the tree performing the requested operation. More...
 
template<class Op >
void Walk (const Op Operation, const std::string &Root, bool IncludeOffline=false) const
 Walk the tree performing the requested operation. More...
 
template<class Op >
void Walk (Op Operation, const std::string &Root, bool IncludeOffline=false)
 Walk the tree performing the requested operation. More...
 
template<class Op >
void Walk (const Op Operation, const std::string &Root, bool IncludeOffline=false) const
 Walk the tree performing the requested operation. More...
 
template<class Op >
void Walk (Op Operation, const std::string &Root, bool IncludeOffline=false)
 Walk the tree performing the requested operation. More...
 
template<class Op >
void Walk (const Op Operation, const std::string &Root, bool IncludeOffline=false) const
 Walk the tree performing the requested operation. More...
 
template<class Op >
void WalkDepthFirst (Op Operation, const std::string &Root)
 Walk the tree depth first performing the requested operation. More...
 
template<class Op >
void WalkDepthFirst (Op Operation, const std::string &Root)
 Walk the tree depth first performing the requested operation. More...
 
template<class Op >
void WalkDepthFirst (Op Operation, const std::string &Root)
 Walk the tree depth first performing the requested operation. More...
 

Friends

class MountPointManagerSingleton
 

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_ref_type [1/3]

◆ directory_ref_type [2/3]

◆ directory_ref_type [3/3]

◆ ScanResults [1/3]

◆ ScanResults [2/3]

◆ ScanResults [3/3]

Member Function Documentation

◆ AddDirectory() [1/3]

bool diskCache::DirectoryManagerSingleton::AddDirectory ( directory_ref_type  Directory)
inlinestatic

◆ AddDirectory() [2/3]

static bool diskCache::DirectoryManagerSingleton::AddDirectory ( directory_ref_type  Directory)
static

◆ AddDirectory() [3/3]

static bool diskCache::DirectoryManagerSingleton::AddDirectory ( directory_ref_type  Directory)
static

◆ CreateDirectory() [1/3]

void diskCache::Cache::DirectoryManager::CreateDirectory ( const std::string &  Name,
const std::string &  Root 
)
inlineinherited

Create a new directory to be added to the collection.

Parameters
[in]NameThe name of the directory.
[in]RootThe root of the above directory.

◆ CreateDirectory() [2/3]

void diskCache::Cache::DirectoryManager::CreateDirectory ( const std::string &  Name,
const std::string &  Root 
)
inherited

Create a new directory to be added to the collection.

Parameters
[in]NameThe name of the directory.
[in]RootThe root of the above directory.

◆ CreateDirectory() [3/3]

void diskCache::Cache::DirectoryManager::CreateDirectory ( const std::string &  Name,
const std::string &  Root 
)
inherited

Create a new directory to be added to the collection.

Parameters
[in]NameThe name of the directory.
[in]RootThe root of the above directory.

◆ DECLARE_READ_WRITE_SINGLETON() [1/3]

diskCache::DirectoryManagerSingleton::DECLARE_READ_WRITE_SINGLETON ( DirectoryManagerSingleton  )

◆ DECLARE_READ_WRITE_SINGLETON() [2/3]

diskCache::DirectoryManagerSingleton::DECLARE_READ_WRITE_SINGLETON ( DirectoryManagerSingleton  )

◆ DECLARE_READ_WRITE_SINGLETON() [3/3]

diskCache::DirectoryManagerSingleton::DECLARE_READ_WRITE_SINGLETON ( DirectoryManagerSingleton  )

◆ Find() [1/4]

static void diskCache::DirectoryManagerSingleton::Find ( const std::string &  Root,
Cache::QueryAnswer Answer 
)
static

◆ Find() [2/4]

static void diskCache::DirectoryManagerSingleton::Find ( const std::string &  Root,
Cache::QueryAnswer Answer 
)
static

◆ Find() [3/4]

void diskCache::DirectoryManagerSingleton::Find ( const std::string &  Root,
Cache::QueryAnswer Answer 
)
inlinestatic

◆ Find() [4/4]

void diskCache::Cache::DirectoryManager::Find ( const std::string &  Root,
QueryAnswer Answer 
) const
inherited

Locate files.

◆ OnUpdate() [1/3]

void diskCache::Cache::DirectoryManager::OnUpdate ( directory_ref_type  Dir,
ScanResults Results 
)
inherited

Update information concearning a single directory.

Parameters
[in]DirThe updated directory information.
[out]ResultsStorage for logging the results.

◆ OnUpdate() [2/3]

void diskCache::Cache::DirectoryManager::OnUpdate ( directory_ref_type  Dir,
ScanResults Results 
)
inherited

Update information concearning a single directory.

Parameters
[in]DirThe updated directory information.
[out]ResultsStorage for logging the results.

◆ OnUpdate() [3/3]

void diskCache::Cache::DirectoryManager::OnUpdate ( directory_ref_type  Dir,
ScanResults Results 
)
inherited

Update information concearning a single directory.

Parameters
[in]DirThe updated directory information.
[out]ResultsStorage for logging the results.

◆ Read() [1/4]

template<>
IBinary& diskCache::Cache::DirectoryManager::Read ( IBinary Stream)
inherited

◆ Read() [2/4]

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

Initialize information from the stream.

Parameters
[in]StreamSource of the information.

◆ Read() [3/4]

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

Initialize information from the stream.

Parameters
[in]StreamSource of the information.

◆ Read() [4/4]

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

Initialize information from the stream.

Parameters
[in]StreamSource of the information.

◆ ReferenceDirectory() [1/3]

directory_ref_type diskCache::Cache::DirectoryManager::ReferenceDirectory ( const std::string &  Name) const
inherited

Locate a directory in the collection.

◆ ReferenceDirectory() [2/3]

DirectoryManager::directory_ref_type diskCache::Cache::DirectoryManager::ReferenceDirectory ( const std::string &  Name) const
inlineinherited

Locate a directory in the collection.

◆ ReferenceDirectory() [3/3]

directory_ref_type diskCache::Cache::DirectoryManager::ReferenceDirectory ( const std::string &  Name) const
inherited

Locate a directory in the collection.

◆ RemoveDirectory() [1/3]

void diskCache::Cache::DirectoryManager::RemoveDirectory ( const std::string &  Name)
inlineinherited

Remove a directory from the collection.

◆ RemoveDirectory() [2/3]

void diskCache::Cache::DirectoryManager::RemoveDirectory ( const std::string &  Name)
inherited

Remove a directory from the collection.

◆ RemoveDirectory() [3/3]

void diskCache::Cache::DirectoryManager::RemoveDirectory ( const std::string &  Name)
inherited

Remove a directory from the collection.

◆ RemoveDirectoryRecursively() [1/3]

void diskCache::DirectoryManagerSingleton::RemoveDirectoryRecursively ( const std::string &  Name)
inlinestatic

Remove a directory from the collection.

◆ RemoveDirectoryRecursively() [2/3]

static void diskCache::DirectoryManagerSingleton::RemoveDirectoryRecursively ( const std::string &  Name)
static

Remove a directory from the collection.

◆ RemoveDirectoryRecursively() [3/3]

static void diskCache::DirectoryManagerSingleton::RemoveDirectoryRecursively ( const std::string &  Name)
static

Remove a directory from the collection.

◆ Scan() [1/4]

static void diskCache::DirectoryManagerSingleton::Scan ( const std::string &  Root,
ScanResults Results 
)
static

Recursively scan a managed directory.

◆ Scan() [2/4]

void diskCache::DirectoryManagerSingleton::Scan ( const std::string &  Root,
ScanResults Results 
)
inlinestatic

Recursively scan a managed directory.

◆ Scan() [3/4]

static void diskCache::DirectoryManagerSingleton::Scan ( const std::string &  Root,
ScanResults Results 
)
static

Recursively scan a managed directory.

◆ Scan() [4/4]

void diskCache::Cache::DirectoryManager::Scan ( directory_ref_type  Dir,
ScanResults Results 
)
inherited

Scan the directory for changes.

◆ Walk() [1/6]

template<class Op >
void diskCache::Cache::DirectoryManager::Walk ( Op  Operation,
const std::string &  Root,
bool  IncludeOffline = false 
)
inherited

Walk the tree performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ Walk() [2/6]

template<class Op >
void diskCache::Cache::DirectoryManager::Walk ( Op  Operation,
const std::string &  Root,
bool  IncludeOffline = false 
)
inherited

Walk the tree performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ Walk() [3/6]

template<class Op >
void diskCache::Cache::DirectoryManager::Walk ( Op  Operation,
const std::string &  Root,
bool  IncludeOffline = false 
)
inherited

Walk the tree performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ Walk() [4/6]

template<class Op >
void diskCache::Cache::DirectoryManager::Walk ( const Op  Operation,
const std::string &  Root,
bool  IncludeOffline = false 
) const
inherited

Walk the tree performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ Walk() [5/6]

template<class Op >
void diskCache::Cache::DirectoryManager::Walk ( const Op  Operation,
const std::string &  Root,
bool  IncludeOffline = false 
) const
inherited

Walk the tree performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ Walk() [6/6]

template<class Op >
void diskCache::Cache::DirectoryManager::Walk ( const Op  Operation,
const std::string &  Root,
bool  IncludeOffline = false 
) const
inherited

Walk the tree performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ WalkDepthFirst() [1/3]

template<class Op >
void diskCache::Cache::DirectoryManager::WalkDepthFirst ( Op  Operation,
const std::string &  Root 
)
inherited

Walk the tree depth first performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ WalkDepthFirst() [2/3]

template<class Op >
void diskCache::Cache::DirectoryManager::WalkDepthFirst ( Op  Operation,
const std::string &  Root 
)
inherited

Walk the tree depth first performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ WalkDepthFirst() [3/3]

template<class Op >
void diskCache::Cache::DirectoryManager::WalkDepthFirst ( Op  Operation,
const std::string &  Root 
)
inherited

Walk the tree depth first performing the requested operation.

Parameters
[in]OperationA function which is to be performed on each node found while walking the tree.
[in]RootDirectory from where to start.

◆ Write() [1/6]

template<>
OStream& diskCache::Cache::DirectoryManager::Write ( OStream Stream)
inherited

◆ Write() [2/6]

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

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Write() [3/6]

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

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Write() [4/6]

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

Dump information to the stream.

Parameters
[in]StreamSink for the information.

◆ Write() [5/6]

template<typename StreamT >
StreamT& diskCache::Cache::DirectoryManager::Write ( StreamT &  Stream)
inherited

◆ Write() [6/6]

template<>
OBinary& diskCache::Cache::DirectoryManager::Write ( OBinary Stream)
inherited

Friends And Related Function Documentation

◆ MountPointManagerSingleton


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