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

Basic delta on top of the hash cache. More...

Inheritance diagram for catapult::cache::BasicHashCacheDelta:
Collaboration diagram for catapult::cache::BasicHashCacheDelta:

Public Types

using ReadOnlyView = HashCacheTypes::CacheReadOnlyType
 
using ValueType = HashCacheDescriptor::ValueType
 

Public Member Functions

 BasicHashCacheDelta (const HashCacheTypes::BaseSetDeltaPointers &hashSets, const HashCacheTypes::Options &options)
 Creates a delta around hashSets and options. More...
 
utils::TimeSpan retentionTime () const
 Gets the retention time for the cache. More...
 
deltaset::PruningBoundary< ValueTypepruningBoundary () const
 Gets the pruning boundary that is used during commit. More...
 
void prune (Timestamp timestamp)
 Removes all timestamped hashes that have timestamps prior to the given timestamp minus the retention time. 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::SizeMixin< TSet >
 SizeMixin (const TSet &set)
 Creates a mixin around set. More...
 
size_t size () const
 Gets the number of elements in the cache. More...
 
- Public Member Functions inherited from catapult::cache::ContainsMixin< TSet, TCacheDescriptor >
 ContainsMixin (const TSet &set)
 Creates a mixin around set. More...
 
bool contains (const KeyType &key) const
 Gets a value indicating whether or not the cache contains an element with key. More...
 
- Public Member Functions inherited from catapult::cache::BasicInsertRemoveMixin< TSet, TCacheDescriptor >
 BasicInsertRemoveMixin (TSet &set)
 Creates a mixin around set. More...
 
void insert (const ValueType &value)
 Inserts value into the cache. More...
 
void remove (const KeyType &key)
 Removes the value identified by key from the cache. More...
 
- Public Member Functions inherited from catapult::deltaset::DeltaElementsMixin< TSetDelta >
 DeltaElementsMixin (const TSetDelta &setDelta)
 Creates a mixin around setDelta. More...
 
PointerContainer addedElements () const
 Gets pointers to all added elements. More...
 
PointerContainer modifiedElements () const
 Gets pointers to all modified elements. More...
 
PointerContainer removedElements () const
 Gets pointers to all removed elements. More...
 

Private Attributes

HashCacheTypes::PrimaryTypes::BaseSetDeltaPointerType m_pOrderedDelta
 
utils::TimeSpan m_retentionTime
 
deltaset::PruningBoundary< ValueTypem_pruningBoundary
 

Detailed Description

Basic delta on top of the hash cache.

Member Typedef Documentation

◆ ReadOnlyView

◆ ValueType

Constructor & Destructor Documentation

◆ BasicHashCacheDelta()

catapult::cache::BasicHashCacheDelta::BasicHashCacheDelta ( const HashCacheTypes::BaseSetDeltaPointers &  hashSets,
const HashCacheTypes::Options options 
)

Creates a delta around hashSets and options.

Member Function Documentation

◆ prune()

void catapult::cache::BasicHashCacheDelta::prune ( Timestamp  timestamp)

Removes all timestamped hashes that have timestamps prior to the given timestamp minus the retention time.

Here is the call graph for this function:

◆ pruningBoundary()

deltaset::PruningBoundary< BasicHashCacheDelta::ValueType > catapult::cache::BasicHashCacheDelta::pruningBoundary ( ) const

Gets the pruning boundary that is used during commit.

◆ retentionTime()

utils::TimeSpan catapult::cache::BasicHashCacheDelta::retentionTime ( ) const

Gets the retention time for the cache.

Member Data Documentation

◆ m_pOrderedDelta

HashCacheTypes::PrimaryTypes::BaseSetDeltaPointerType catapult::cache::BasicHashCacheDelta::m_pOrderedDelta
private

◆ m_pruningBoundary

deltaset::PruningBoundary<ValueType> catapult::cache::BasicHashCacheDelta::m_pruningBoundary
private

◆ m_retentionTime

utils::TimeSpan catapult::cache::BasicHashCacheDelta::m_retentionTime
private

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