CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::CatapultCacheDelta Class Reference

Delta on top of a catapult cache. More...

Public Member Functions

 CatapultCacheDelta (std::vector< std::unique_ptr< SubCacheView >> &&subViews)
 Creates a locked catapult cache delta from subViews. More...
 
 ~CatapultCacheDelta ()
 Destroys the delta. More...
 
 CatapultCacheDelta (CatapultCacheDelta &&)
 
CatapultCacheDeltaoperator= (CatapultCacheDelta &&)
 
template<typename TCache >
const TCache::CacheDeltaType & sub () const
 Gets a specific sub cache delta view. More...
 
template<typename TCache >
TCache::CacheDeltaType & sub ()
 Gets a specific sub cache delta view. More...
 
StateHashInfo calculateStateHash (Height height) const
 Calculates the cache state hash given height. More...
 
void setSubCacheMerkleRoots (const std::vector< Hash256 > &subCacheMerkleRoots)
 Sets the merkle roots for all sub caches (subCacheMerkleRoots). More...
 
ReadOnlyCatapultCache toReadOnly () const
 Creates a read-only view of this delta. More...
 

Private Attributes

std::vector< std::unique_ptr< SubCacheView > > m_subViews
 

Detailed Description

Delta on top of a catapult cache.

Constructor & Destructor Documentation

◆ CatapultCacheDelta() [1/2]

catapult::cache::CatapultCacheDelta::CatapultCacheDelta ( std::vector< std::unique_ptr< SubCacheView >> &&  subViews)
explicit

Creates a locked catapult cache delta from subViews.

◆ ~CatapultCacheDelta()

catapult::cache::CatapultCacheDelta::~CatapultCacheDelta ( )
default

Destroys the delta.

◆ CatapultCacheDelta() [2/2]

catapult::cache::CatapultCacheDelta::CatapultCacheDelta ( CatapultCacheDelta &&  )
default

Member Function Documentation

◆ calculateStateHash()

StateHashInfo catapult::cache::CatapultCacheDelta::calculateStateHash ( Height  height) const

Calculates the cache state hash given height.

Here is the caller graph for this function:

◆ operator=()

CatapultCacheDelta & catapult::cache::CatapultCacheDelta::operator= ( CatapultCacheDelta &&  )
default

◆ setSubCacheMerkleRoots()

void catapult::cache::CatapultCacheDelta::setSubCacheMerkleRoots ( const std::vector< Hash256 > &  subCacheMerkleRoots)

Sets the merkle roots for all sub caches (subCacheMerkleRoots).

Here is the caller graph for this function:

◆ sub() [1/2]

template<typename TCache >
TCache::CacheDeltaType& catapult::cache::CatapultCacheDelta::sub ( )
inline

Gets a specific sub cache delta view.

◆ sub() [2/2]

template<typename TCache >
const TCache::CacheDeltaType& catapult::cache::CatapultCacheDelta::sub ( ) const
inline

Gets a specific sub cache delta view.

Here is the caller graph for this function:

◆ toReadOnly()

ReadOnlyCatapultCache catapult::cache::CatapultCacheDelta::toReadOnly ( ) const

Creates a read-only view of this delta.

Here is the caller graph for this function:

Member Data Documentation

◆ m_subViews

std::vector<std::unique_ptr<SubCacheView> > catapult::cache::CatapultCacheDelta::m_subViews
private

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