CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
28 class CacheChangesStorage;
34 namespace catapult {
namespace cache {
77 virtual const void*
get()
const = 0;
80 virtual void*
get() = 0;
106 virtual std::unique_ptr<SubCacheView>
tryLock() = 0;
120 virtual const std::string&
name()
const = 0;
123 virtual size_t id()
const = 0;
127 virtual std::unique_ptr<const SubCacheView>
createView()
const = 0;
131 virtual std::unique_ptr<SubCacheView>
createDelta() = 0;
138 virtual void commit() = 0;
142 virtual const void*
get()
const = 0;
SubCacheViewType
Sub cache view types.
Definition: SubCachePlugin.h:39
virtual std::unique_ptr< CacheChangesStorage > createChangesStorage() const =0
Returns a cache changes storage based on this cache.
virtual size_t id() const =0
Gets the cache id.
virtual std::unique_ptr< const SubCacheView > createView() const =0
Returns a locked cache view based on this cache.
virtual const void * get() const =0
Returns a const pointer to the underlying cache.
virtual ~DetachedSubCacheView()=default
Sub cache view identifier.
Definition: SubCachePlugin.h:51
virtual const void * get() const =0
Returns a const pointer to the underlying view.
virtual void updateMerkleRoot(Height height)=0
Recalculates the merkle root given the specified chain height if supported.
Detached sub cache view.
Definition: SubCachePlugin.h:99
SubCacheViewType ViewType
View type.
Definition: SubCachePlugin.h:60
virtual std::unique_ptr< CacheStorage > createStorage()=0
Returns a cache storage based on this cache.
size_t CacheId
Cache id.
Definition: SubCachePlugin.h:57
virtual std::unique_ptr< DetachedSubCacheView > createDetachedDelta() const =0
virtual std::unique_ptr< SubCacheView > createDelta()=0
Sub cache view.
Definition: SubCachePlugin.h:68
Sub cache plugin that can be added to the main catapult cache.
Definition: SubCachePlugin.h:114
virtual const std::string & name() const =0
Gets the cache name.
virtual const SubCacheViewIdentifier & id() const =0
Gets view identifier.
virtual void commit()=0
Commits all pending changes to the underlying storage.
virtual ~SubCacheView()=default
virtual const void * asReadOnly() const =0
Returns a read-only view of this view.
Definition: AddressExtractionExtension.cpp:28
std::array< char, 16 > CacheName
Definition: SubCachePlugin.h:54
virtual bool trySetMerkleRoot(const Hash256 &merkleRoot)=0
Sets the cache merkle root (merkleRoot) if supported.
virtual bool tryGetMerkleRoot(Hash256 &merkleRoot) const =0
Gets the cache merkle root (merkleRoot) if supported.
virtual bool supportsMerkleRoot() const =0
Returns true if cache supports merkle root.
virtual ~SubCachePlugin()=default
virtual std::unique_ptr< SubCacheView > tryLock()=0