ldas-tools-diskcacheAPI  2.7.0
Classes | Typedefs | Functions | Variables
anonymous_namespace{HotDirectory.cc} Namespace Reference

Classes

class  daemon
 Process the collection of hot directories. More...
 

Typedefs

typedef std::map< std::string, daemon::infohot_directory_container_type
 Container type for storing hot directory information. More...
 

Functions

MutexLock::baton_type baton ()
 Obtain lock. More...
 
hot_directory_container_typehot_list ()
 Obtain list of registered hot directories. More...
 
void cond_register (daemon::weak_dir_info_type Entry, const HotDirectory::directory_set_type &DirectorySet, bool Log)
 Register Entry in collection of hot directories. More...
 
bool is_hot (daemon::dir_info_type *Entry)
 Check if Entry is hot. More...
 
bool is_hot (daemon::weak_dir_info_type Entry)
 Check if Entry is hot. More...
 
void unregister (daemon::weak_dir_info_type Entry)
 Remove Entry from collection of hot directories. More...
 

Variables

static const std::string JOB_INFO = "HOT_DIR"
 
TaskThread * HotDirectoryThread = (TaskThread*)NULL
 
daemonHotDirectoryTask = new daemon
 

Typedef Documentation

◆ hot_directory_container_type

typedef std::map< std::string, daemon::info > anonymous_namespace{HotDirectory.cc}::hot_directory_container_type

Container type for storing hot directory information.

This container class stores information about directories that are considered hot. The container is indexed by the directory path.

Function Documentation

◆ baton()

MutexLock::baton_type anonymous_namespace{HotDirectory.cc}::baton ( )
inline

Obtain lock.

The use of a function ensures the proper initialization of the data without having to depend on the link order initialization.

◆ cond_register()

void anonymous_namespace{HotDirectory.cc}::cond_register ( daemon::weak_dir_info_type  Entry,
const HotDirectory::directory_set_type DirectorySet,
bool  Log 
)
inline

Register Entry in collection of hot directories.

This method registers Entry with the collection of hot directories only if it is not already a part of the collection.

Parameters
[in]EntryThe directory entry to be registered.
[in]LogSet to true if the directory should log a message if Entry is added to the hot list.

◆ hot_list()

hot_directory_container_type& anonymous_namespace{HotDirectory.cc}::hot_list ( )
inline

Obtain list of registered hot directories.

The use of a function ensures the proper initialization of the data without having to depend on the link order initialization.

◆ is_hot() [1/2]

bool anonymous_namespace{HotDirectory.cc}::is_hot ( daemon::dir_info_type Entry)
inline

Check if Entry is hot.

This method will check if Entry has been modified within the specified time constraint. If it has, then it is considered hot.

Parameters
[in]EntryThe directory entry to be checked.
Returns
The value true is returned if the Entry is considered hot, false otherwise.

◆ is_hot() [2/2]

bool anonymous_namespace{HotDirectory.cc}::is_hot ( daemon::weak_dir_info_type  Entry)
inline

Check if Entry is hot.

This method will check if Entry has been modified within the specified time constraint. If it has, then it is considered hot.

Parameters
[in]EntryThe directory entry to be checked.
Returns
The value true is returned if the Entry is considered hot, false otherwise.

◆ unregister()

void anonymous_namespace{HotDirectory.cc}::unregister ( daemon::weak_dir_info_type  Entry)
inline

Remove Entry from collection of hot directories.

Rmeoves Entry from the collection of hot directories. This operation needs to be very careful as the requested Entry for removal may currently be in a scanning mode. It also needs to be careful as the Entry may be in its destructor state at the time of this call.

Parameters
[in]EntryThe directory entry to be removed from the collection of hot directories.

Variable Documentation

◆ HotDirectoryTask

daemon* anonymous_namespace{HotDirectory.cc}::HotDirectoryTask = new daemon

◆ HotDirectoryThread

TaskThread* anonymous_namespace{HotDirectory.cc}::HotDirectoryThread = (TaskThread*)NULL

◆ JOB_INFO

const std::string anonymous_namespace{HotDirectory.cc}::JOB_INFO = "HOT_DIR"
static