CatapultServer
v0.5.0.1 (Elephant)
|
Decorator that synchronizes access to a cache and allows custom cache initialization. More...
Public Member Functions | |
SynchronizedCacheWithInit (TCache &&cache) | |
Creates a synchronized decorator around cache. More... | |
template<typename... TArgs> | |
void | init (TArgs &&... args) |
Initializes the underlying cache with args. More... | |
Public Member Functions inherited from catapult::cache::SynchronizedCache< TCache > | |
SynchronizedCache (TCache &&cache) | |
Creates a synchronized decorator around cache. More... | |
LockedCacheView< CacheViewType > | createView () const |
Returns a locked cache view based on this cache. More... | |
LockedCacheDelta< CacheDeltaType > | createDelta () |
LockableCacheDelta< CacheDeltaType > | createDetachedDelta () const |
void | commit () |
Commits all pending changes to the underlying storage. More... | |
Private Attributes | |
bool | m_isInitCalled |
Additional Inherited Members | |
Public Types inherited from catapult::cache::SynchronizedCache< TCache > | |
using | CacheValueType = typename TCache::CacheValueType |
using | CacheViewType = typename TCache::CacheViewType |
using | CacheDeltaType = typename TCache::CacheDeltaType |
using | CacheReadOnlyType = typename TCache::CacheReadOnlyType |
Protected Member Functions inherited from catapult::cache::SynchronizedCache< TCache > | |
TCache & | cache () |
Gets a typed reference to the underlying cache. More... | |
Decorator that synchronizes access to a cache and allows custom cache initialization.
|
inlineexplicit |
Creates a synchronized decorator around cache.
|
inline |
Initializes the underlying cache with args.
|
private |