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

CacheChangesStorage implementation that wraps a cache and associated storage traits. More...

Inheritance diagram for catapult::cache::CacheChangesStorageAdapter< TCache, TStorageTraits >:
Collaboration diagram for catapult::cache::CacheChangesStorageAdapter< TCache, TStorageTraits >:

Public Member Functions

 CacheChangesStorageAdapter (TCache &cache)
 Creates an adapter around cache. More...
 
void saveAll (const CacheChanges &changes, io::OutputStream &output) const override
 Saves cache changes to output. More...
 
std::unique_ptr< const MemoryCacheChangesloadAll (io::InputStream &input) const override
 Loads cache changes from input. More...
 
void apply (const CacheChanges &changes) const override
 Applies cache changes to the underlying cache. More...
 
- Public Member Functions inherited from catapult::cache::CacheChangesStorage
virtual ~CacheChangesStorage ()=default
 

Private Attributes

TCache & m_cache
 

Detailed Description

template<typename TCache, typename TStorageTraits>
class catapult::cache::CacheChangesStorageAdapter< TCache, TStorageTraits >

CacheChangesStorage implementation that wraps a cache and associated storage traits.

Constructor & Destructor Documentation

◆ CacheChangesStorageAdapter()

template<typename TCache , typename TStorageTraits >
catapult::cache::CacheChangesStorageAdapter< TCache, TStorageTraits >::CacheChangesStorageAdapter ( TCache &  cache)
inlineexplicit

Creates an adapter around cache.

Member Function Documentation

◆ apply()

template<typename TCache , typename TStorageTraits >
void catapult::cache::CacheChangesStorageAdapter< TCache, TStorageTraits >::apply ( const CacheChanges changes) const
inlineoverridevirtual

Applies cache changes to the underlying cache.

Implements catapult::cache::CacheChangesStorage.

Here is the call graph for this function:

◆ loadAll()

template<typename TCache , typename TStorageTraits >
std::unique_ptr<const MemoryCacheChanges> catapult::cache::CacheChangesStorageAdapter< TCache, TStorageTraits >::loadAll ( io::InputStream input) const
inlineoverridevirtual

Loads cache changes from input.

Implements catapult::cache::CacheChangesStorage.

◆ saveAll()

template<typename TCache , typename TStorageTraits >
void catapult::cache::CacheChangesStorageAdapter< TCache, TStorageTraits >::saveAll ( const CacheChanges changes,
io::OutputStream output 
) const
inlineoverridevirtual

Saves cache changes to output.

Implements catapult::cache::CacheChangesStorage.

Here is the call graph for this function:

Member Data Documentation

◆ m_cache

template<typename TCache , typename TStorageTraits >
TCache& catapult::cache::CacheChangesStorageAdapter< TCache, TStorageTraits >::m_cache
private

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