CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::SubCachePlugin Class Referenceabstract

Sub cache plugin that can be added to the main catapult cache. More...

Inheritance diagram for catapult::cache::SubCachePlugin:

Public Member Functions

virtual ~SubCachePlugin ()=default
 
virtual const std::string & name () const =0
 Gets the cache name. More...
 
virtual size_t id () const =0
 Gets the cache id. More...
 
virtual std::unique_ptr< const SubCacheViewcreateView () const =0
 Returns a locked cache view based on this cache. More...
 
virtual std::unique_ptr< SubCacheViewcreateDelta ()=0
 
virtual std::unique_ptr< DetachedSubCacheViewcreateDetachedDelta () const =0
 
virtual void commit ()=0
 Commits all pending changes to the underlying storage. More...
 
virtual const void * get () const =0
 Returns a const pointer to the underlying cache. More...
 
virtual std::unique_ptr< CacheStoragecreateStorage ()=0
 Returns a cache storage based on this cache. More...
 
virtual std::unique_ptr< CacheChangesStoragecreateChangesStorage () const =0
 Returns a cache changes storage based on this cache. More...
 

Detailed Description

Sub cache plugin that can be added to the main catapult cache.

Constructor & Destructor Documentation

◆ ~SubCachePlugin()

virtual catapult::cache::SubCachePlugin::~SubCachePlugin ( )
virtualdefault

Member Function Documentation

◆ commit()

virtual void catapult::cache::SubCachePlugin::commit ( )
pure virtual

◆ createChangesStorage()

virtual std::unique_ptr<CacheChangesStorage> catapult::cache::SubCachePlugin::createChangesStorage ( ) const
pure virtual

◆ createDelta()

virtual std::unique_ptr<SubCacheView> catapult::cache::SubCachePlugin::createDelta ( )
pure virtual

Returns a locked cache delta based on this cache.

Note
Changes to an attached delta can be committed by calling commit.

Implemented in catapult::cache::SubCachePluginAdapter< TCache, TStorageTraits >, and catapult::cache::SubCachePluginAdapter< BlockDifficultyCache, BlockDifficultyCacheStorage >.

◆ createDetachedDelta()

virtual std::unique_ptr<DetachedSubCacheView> catapult::cache::SubCachePlugin::createDetachedDelta ( ) const
pure virtual

Returns a lockable cache delta based on this cache but without the ability to commit any changes to the original cache.

Implemented in catapult::cache::SubCachePluginAdapter< TCache, TStorageTraits >, and catapult::cache::SubCachePluginAdapter< BlockDifficultyCache, BlockDifficultyCacheStorage >.

◆ createStorage()

◆ createView()

virtual std::unique_ptr<const SubCacheView> catapult::cache::SubCachePlugin::createView ( ) const
pure virtual

◆ get()

virtual const void* catapult::cache::SubCachePlugin::get ( ) const
pure virtual

◆ id()

virtual size_t catapult::cache::SubCachePlugin::id ( ) const
pure virtual

◆ name()

virtual const std::string& catapult::cache::SubCachePlugin::name ( ) const
pure virtual

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