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

CacheStorage implementation for saving and loading summary cache data. More...

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

Public Member Functions

 SummaryCacheStorage (TCache &cache)
 Creates a storage around cache. More...
 
const std::string & name () const override
 Gets the cache name. More...
 
- Public Member Functions inherited from catapult::cache::CacheStorage
virtual ~CacheStorage ()=default
 
virtual void saveAll (const CatapultCacheView &cacheView, io::OutputStream &output) const =0
 Saves cache data from cacheView to output. More...
 
virtual void saveSummary (const CatapultCacheDelta &cacheDelta, io::OutputStream &output) const =0
 Saves cache (summary) data from cacheDelta to output. More...
 
virtual void loadAll (io::InputStream &input, size_t batchSize)=0
 Loads cache data from input in batches of batchSize. More...
 

Protected Member Functions

const TCache & cache () const
 Gets a typed const reference to the underlying cache. More...
 
TCache & cache ()
 Gets a typed reference to the underlying cache. More...
 

Private Attributes

TCache & m_cache
 
std::string m_name
 

Detailed Description

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

CacheStorage implementation for saving and loading summary cache data.

Constructor & Destructor Documentation

◆ SummaryCacheStorage()

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

Creates a storage around cache.

Member Function Documentation

◆ cache() [1/2]

template<typename TCache>
TCache& catapult::cache::SummaryCacheStorage< TCache >::cache ( )
inlineprotected

Gets a typed reference to the underlying cache.

◆ cache() [2/2]

template<typename TCache>
const TCache& catapult::cache::SummaryCacheStorage< TCache >::cache ( ) const
inlineprotected

Gets a typed const reference to the underlying cache.

◆ name()

template<typename TCache>
const std::string& catapult::cache::SummaryCacheStorage< TCache >::name ( ) const
inlineoverridevirtual

Gets the cache name.

Implements catapult::cache::CacheStorage.

Member Data Documentation

◆ m_cache

template<typename TCache>
TCache& catapult::cache::SummaryCacheStorage< TCache >::m_cache
private

◆ m_name

template<typename TCache>
std::string catapult::cache::SummaryCacheStorage< TCache >::m_name
private

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