CatapultServer
v0.5.0.1 (Elephant)
|
Interface for loading and saving cache data. More...
Public Member Functions | |
virtual | ~CacheStorage ()=default |
virtual const std::string & | name () const =0 |
Gets the cache name. More... | |
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... | |
Interface for loading and saving cache data.
|
virtualdefault |
|
pure virtual |
Loads cache data from input in batches of batchSize.
Implemented in catapult::cache::NamespaceCacheSummaryCacheStorage, catapult::cache::AccountStateCacheSummaryCacheStorage, catapult::cache::CacheStorageAdapter< TCache, TStorageTraits >, and catapult::cache::CacheStorageAdapter< BlockDifficultyCache, BlockDifficultyCacheStorage >.
|
pure virtual |
Gets the cache name.
Implemented in catapult::cache::CacheStorageAdapter< TCache, TStorageTraits >, catapult::cache::CacheStorageAdapter< BlockDifficultyCache, BlockDifficultyCacheStorage >, catapult::cache::SummaryCacheStorage< TCache >, catapult::cache::SummaryCacheStorage< AccountStateCache >, and catapult::cache::SummaryCacheStorage< NamespaceCache >.
|
pure virtual |
Saves cache data from cacheView to output.
Implemented in catapult::cache::CacheStorageAdapter< TCache, TStorageTraits >, catapult::cache::CacheStorageAdapter< BlockDifficultyCache, BlockDifficultyCacheStorage >, catapult::cache::NamespaceCacheSummaryCacheStorage, and catapult::cache::AccountStateCacheSummaryCacheStorage.
|
pure virtual |
Saves cache (summary) data from cacheDelta to output.
Implemented in catapult::cache::NamespaceCacheSummaryCacheStorage, catapult::cache::AccountStateCacheSummaryCacheStorage, catapult::cache::BlockDifficultyCacheSummaryCacheStorage, catapult::cache::CacheStorageAdapter< TCache, TStorageTraits >, and catapult::cache::CacheStorageAdapter< BlockDifficultyCache, BlockDifficultyCacheStorage >.