CatapultServer
v0.5.0.1 (Elephant)
|
A CacheStorage implementation that wraps a cache and associated storage traits. More...
Public Member Functions | |
CacheStorageAdapter (TCache &cache) | |
Creates an adapter around cache. More... | |
const std::string & | name () const override |
Gets the cache name. More... | |
void | saveAll (const CatapultCacheView &cacheView, io::OutputStream &output) const override |
Saves cache data from cacheView to output. More... | |
void | saveSummary (const CatapultCacheDelta &, io::OutputStream &) const override |
Saves cache (summary) data from cacheDelta to output. More... | |
void | loadAll (io::InputStream &input, size_t batchSize) override |
Loads cache data from input in batches of batchSize. More... | |
Public Member Functions inherited from catapult::cache::CacheStorage | |
virtual | ~CacheStorage ()=default |
Static Private Member Functions | |
template<typename T > | |
static void | SaveValue (const T &value, io::OutputStream &output) |
template<typename T1 , typename T2 > | |
static void | SaveValue (const std::pair< T1, T2 > &pair, io::OutputStream &output) |
Private Attributes | |
TCache & | m_cache |
std::string | m_name |
A CacheStorage implementation that wraps a cache and associated storage traits.
|
inlineexplicit |
Creates an adapter around cache.
|
inlineoverridevirtual |
Loads cache data from input in batches of batchSize.
Implements catapult::cache::CacheStorage.
|
inlineoverridevirtual |
Gets the cache name.
Implements catapult::cache::CacheStorage.
|
inlineoverridevirtual |
Saves cache data from cacheView to output.
Implements catapult::cache::CacheStorage.
|
inlineoverridevirtual |
Saves cache (summary) data from cacheDelta to output.
Implements catapult::cache::CacheStorage.
|
inlinestaticprivate |
|
inlinestaticprivate |
|
private |
|
private |