Public Member Functions | |
void | registerCache (Cache *cache) |
void | removeCache (Cache *cache) |
void | flushCaches () |
Static Public Member Functions | |
static CacheManager & | getInstance () |
Private Member Functions | |
CacheManager () | |
CacheManager (CacheManager const &) | |
void | operator= (CacheManager const &) |
Private Attributes | |
std::vector< Cache * > | _registry |
boost::mutex | _registryMutex |
A singleton class to manage flushing of caches.
Definition at line 17 of file CacheManager.h.
|
inlineexplicitprivate |
|
private |
void novadaq::CacheManager::flushCaches | ( | ) |
Flushes the caches that have been registered.
Definition at line 41 of file CacheManager.cpp.
References _registry, _registryMutex, and compare_h5_caf::idx.
Referenced by CacheTests::testEnvVarCacheBasic().
|
static |
Returns the single instance of the CacheManager.
Definition at line 10 of file CacheManager.cpp.
Referenced by novadaq::EnvVarCache::EnvVarCache(), and CacheTests::testEnvVarCacheBasic().
|
private |
Referenced by CacheManager().
Registers the specified cache with the CacheManager. Registered caches will be flushed when the CacheManager receives a flush request.
cache | a pointer to the cache that should be registered. |
Definition at line 22 of file CacheManager.cpp.
References _registry, and _registryMutex.
Referenced by novadaq::EnvVarCache::EnvVarCache().
Removes the specified cache from the CacheManager.
cache | a pointer to the cache that should be removed. |
Definition at line 32 of file CacheManager.cpp.
References _registry, and _registryMutex.
|
private |
The list of registered caches.
Definition at line 43 of file CacheManager.h.
Referenced by flushCaches(), registerCache(), and removeCache().
|
private |
A mutex to protect against concurrent use of the registry.
Definition at line 48 of file CacheManager.h.
Referenced by flushCaches(), registerCache(), and removeCache().