CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes > Class Template Reference

Basic delta on top of the lock info cache. More...

Inheritance diagram for catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >:
Collaboration diagram for catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >:

Public Types

using ReadOnlyView = typename TCacheTypes::CacheReadOnlyType
 

Public Member Functions

 BasicLockInfoCacheDelta (const typename TCacheTypes::BaseSetDeltaPointers &lockInfoSets)
 Creates a delta around lockInfoSets. More...
 
void insert (const typename TDescriptor::ValueType &value)
 Inserts value into the cache. More...
 
void remove (const typename TDescriptor::KeyType &key)
 Removes the value identified by key from the cache. More...
 
void processUnusedExpiredLocks (Height height, const consumer< const typename TDescriptor::ValueType > &consumer) const
 Processes all unused lock infos that expired at height by passing them to consumer. More...
 
- Public Member Functions inherited from catapult::utils::MoveOnly
constexpr MoveOnly ()=default
 Default constructor. More...
 
 ~MoveOnly ()=default
 Default destructor. More...
 
 MoveOnly (const NonCopyable &)=delete
 Disabled copy constructor. More...
 
 MoveOnly (MoveOnly &&)=default
 Default move constructor. More...
 
MoveOnlyoperator= (const MoveOnly &)=delete
 Disabled assignment operator. More...
 
MoveOnlyoperator= (MoveOnly &&)=default
 Default move assignment operator. More...
 
- Public Member Functions inherited from catapult::cache::HeightBasedTouchMixin< TSet, THeightGroupedSet >
 HeightBasedTouchMixin (TSet &set, THeightGroupedSet &heightGroupedSet)
 Creates a mixin around set and heightGroupedSet. More...
 
THeightGroupedSet::ElementType::Identifiers touch (Height height)
 Touches the cache at height and returns identifiers of all deactivating elements. More...
 
- Public Member Functions inherited from catapult::cache::HeightBasedPruningMixin< TSet, THeightGroupedSet >
 HeightBasedPruningMixin (TSet &set, THeightGroupedSet &heightGroupedSet)
 Creates a mixin around set and heightGroupedSet. More...
 
void prune (Height height)
 Prunes the cache at height. More...
 

Private Attributes

TCacheTypes::PrimaryTypes::BaseSetDeltaPointerType m_pDelta
 
TCacheTypes::HeightGroupingTypes::BaseSetDeltaPointerType m_pHeightGroupingDelta
 

Detailed Description

template<typename TDescriptor, typename TCacheTypes>
class catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >

Basic delta on top of the lock info cache.

Member Typedef Documentation

◆ ReadOnlyView

template<typename TDescriptor, typename TCacheTypes>
using catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >::ReadOnlyView = typename TCacheTypes::CacheReadOnlyType

Constructor & Destructor Documentation

◆ BasicLockInfoCacheDelta()

template<typename TDescriptor, typename TCacheTypes>
catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >::BasicLockInfoCacheDelta ( const typename TCacheTypes::BaseSetDeltaPointers &  lockInfoSets)
inlineexplicit

Creates a delta around lockInfoSets.

Member Function Documentation

◆ insert()

template<typename TDescriptor, typename TCacheTypes>
void catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >::insert ( const typename TDescriptor::ValueType &  value)
inline

Inserts value into the cache.

◆ processUnusedExpiredLocks()

template<typename TDescriptor, typename TCacheTypes>
void catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >::processUnusedExpiredLocks ( Height  height,
const consumer< const typename TDescriptor::ValueType > &  consumer 
) const
inline

Processes all unused lock infos that expired at height by passing them to consumer.

◆ remove()

template<typename TDescriptor, typename TCacheTypes>
void catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >::remove ( const typename TDescriptor::KeyType &  key)
inline

Removes the value identified by key from the cache.

Member Data Documentation

◆ m_pDelta

template<typename TDescriptor, typename TCacheTypes>
TCacheTypes::PrimaryTypes::BaseSetDeltaPointerType catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >::m_pDelta
private

◆ m_pHeightGroupingDelta

template<typename TDescriptor, typename TCacheTypes>
TCacheTypes::HeightGroupingTypes::BaseSetDeltaPointerType catapult::cache::BasicLockInfoCacheDelta< TDescriptor, TCacheTypes >::m_pHeightGroupingDelta
private

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