ldas-tools-diskcacheAPI
2.6.3
|
Information about a directory that is being actively watched. More...
#include <HotDirectory.hh>
Classes | |
class | UnaryFunction |
Base for unary functions to be used in ForEach call. More... | |
Public Types | |
typedef DirectoryManager | directory_set_type |
typedef boost::shared_ptr< Directory > | shared_dir_info_type |
Storage type for directory information. More... | |
typedef boost::weak_ptr< shared_dir_info_type::element_type > | weak_dir_info_type |
Storage type for directory information. More... | |
typedef Directory::timestamp_type | timestamp_type |
Static Public Member Functions | |
static void | ForEach (UnaryFunction &Func) |
Iterate over each hot directory. More... | |
static timestamp_type | HotLowerBound () |
Lower bound of relative age in seconds to be considered. More... | |
static void | HotLowerBound (timestamp_type Value) |
Set lower bound of relative age in seconds to be considered. More... | |
static bool | IsRegistered (const std::string &Path) |
Report if the path is registered as hot. More... | |
static void | RegisterIfHot (weak_dir_info_type Entry, const directory_set_type &Manager, bool Log) |
Add a directory to the list of hot directories. More... | |
static void | Reset () |
Clear the cache. More... | |
static void | ScanInterval (timestamp_type Value) |
Establish the frequency that hot directories are scanned. More... | |
static timestamp_type | ScanInterval () |
The frequency that hot directories are scanned. More... | |
static void | StopDaemon () |
Shutdown daemon which is scanning the list of hot directories. More... | |
static void | Unregister (weak_dir_info_type Entry) |
Remove a directory from the list of hot directories. More... | |
Information about a directory that is being actively watched.
This maintains a collection of hot directories. Hot directories are scanned outside of the conventional deep scan of the MountPoint class so as to reduce discovery latency.
typedef boost::shared_ptr< Directory > diskCache::Cache::HotDirectory::shared_dir_info_type |
Storage type for directory information.
Storage of the directory information allowing for reference counting so as to protect the memory being referenced to stay within scope till all consumers have completed their use of of the data.
typedef boost::weak_ptr< shared_dir_info_type::element_type > diskCache::Cache::HotDirectory::weak_dir_info_type |
Storage type for directory information.
Having the directory information stored in a shared pointer container increases thread safety and diminishes the needs for locks.
|
static |
Iterate over each hot directory.
[in] | Func | Function to execute. |
|
static |
Lower bound of relative age in seconds to be considered.
Return the time representing the lower bounds of what should be considered hot.
|
static |
Set lower bound of relative age in seconds to be considered.
[in] | Value | The new lower bound. A value of 0 (zero) disables hot directories. |
Establish the time representing the lower bounds of what should be considered hot.
|
static |
Report if the path is registered as hot.
[in] | Path | The path to check. |
This method simply reports if a directory is in the collection of directories that are scanned at a higher rate as they appear to be actively filling with new files.
|
static |
Add a directory to the list of hot directories.
[in] | Entry | The Entry to add to the list of hot directories if and only if it meets all hot directory criteria. |
[in] | Manager | Directory set. |
[in] | Log | Set to true if the directory should log a message if Entry is added to the hot list. |
Checks to see if the directory has been modified within the time range to be considered hot. Directories found to be hot are added to the list of hot directories and are scanned more frequently.
|
static |
Clear the cache.
This returns the cache to an empty state.
|
static |
Establish the frequency that hot directories are scanned.
[in] | Value | The new scan interval. |
Establish the time representing the number of seconds to sleep between scans of the set of hot directories.
|
inlinestatic |
The frequency that hot directories are scanned.
Return the time representing the number of seconds to sleep between scans of the set of hot directories.
|
static |
Shutdown daemon which is scanning the list of hot directories.
|
static |
Remove a directory from the list of hot directories.
[in] | Entry | The Entry to be removed from the list of hot directories. |