CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::SynchronizedCacheWithInit< TCache > Class Template Reference

Decorator that synchronizes access to a cache and allows custom cache initialization. More...

Inheritance diagram for catapult::cache::SynchronizedCacheWithInit< TCache >:
Collaboration diagram for catapult::cache::SynchronizedCacheWithInit< TCache >:

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< CacheViewTypecreateView () const
 Returns a locked cache view based on this cache. More...
 
LockedCacheDelta< CacheDeltaTypecreateDelta ()
 
LockableCacheDelta< CacheDeltaTypecreateDetachedDelta () 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...
 

Detailed Description

template<typename TCache>
class catapult::cache::SynchronizedCacheWithInit< TCache >

Decorator that synchronizes access to a cache and allows custom cache initialization.

Constructor & Destructor Documentation

◆ SynchronizedCacheWithInit()

template<typename TCache>
catapult::cache::SynchronizedCacheWithInit< TCache >::SynchronizedCacheWithInit ( TCache &&  cache)
inlineexplicit

Creates a synchronized decorator around cache.

Member Function Documentation

◆ init()

template<typename TCache>
template<typename... TArgs>
void catapult::cache::SynchronizedCacheWithInit< TCache >::init ( TArgs &&...  args)
inline

Initializes the underlying cache with args.

Here is the caller graph for this function:

Member Data Documentation

◆ m_isInitCalled

template<typename TCache>
bool catapult::cache::SynchronizedCacheWithInit< TCache >::m_isInitCalled
private

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