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

A write only view on top of a cache height. More...

Inheritance diagram for catapult::cache::CacheHeightModifier:
Collaboration diagram for catapult::cache::CacheHeightModifier:

Public Member Functions

 CacheHeightModifier (Height &height, utils::SpinReaderWriterLock::ReaderLockGuard &&readLock)
 Creates a write only view around height with lock context readLock. More...
 
void set (Height height)
 Sets the cache height to height. 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...
 

Private Attributes

Heightm_height
 
utils::SpinReaderWriterLock::ReaderLockGuard m_readLock
 
utils::SpinReaderWriterLock::WriterLockGuard m_writeLock
 

Detailed Description

A write only view on top of a cache height.

Constructor & Destructor Documentation

◆ CacheHeightModifier()

catapult::cache::CacheHeightModifier::CacheHeightModifier ( Height height,
utils::SpinReaderWriterLock::ReaderLockGuard &&  readLock 
)
inlineexplicit

Creates a write only view around height with lock context readLock.

Member Function Documentation

◆ set()

void catapult::cache::CacheHeightModifier::set ( Height  height)
inline

Sets the cache height to height.

Member Data Documentation

◆ m_height

Height& catapult::cache::CacheHeightModifier::m_height
private

◆ m_readLock

utils::SpinReaderWriterLock::ReaderLockGuard catapult::cache::CacheHeightModifier::m_readLock
private

◆ m_writeLock

utils::SpinReaderWriterLock::WriterLockGuard catapult::cache::CacheHeightModifier::m_writeLock
private

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