CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::LockableCacheDelta< TCacheDelta > Class Template Reference
Collaboration diagram for catapult::cache::LockableCacheDelta< TCacheDelta >:

Public Member Functions

 LockableCacheDelta (TCacheDelta &&cacheDelta, const size_t &commitCounter, utils::SpinReaderWriterLock &lock)
 
OptionalLockedCacheDelta< TCacheDelta > tryLock ()
 

Private Attributes

TCacheDelta m_cacheDelta
 
size_t m_initialCommitCount
 
const size_t & m_commitCounter
 
utils::SpinReaderWriterLockm_lock
 

Constructor & Destructor Documentation

◆ LockableCacheDelta()

template<typename TCacheDelta >
catapult::cache::LockableCacheDelta< TCacheDelta >::LockableCacheDelta ( TCacheDelta &&  cacheDelta,
const size_t &  commitCounter,
utils::SpinReaderWriterLock lock 
)
inline

Creates a lockable cache delta around cacheDelta using the specified lock and commit counter (commitCounter).

Member Function Documentation

◆ tryLock()

template<typename TCacheDelta >
OptionalLockedCacheDelta<TCacheDelta> catapult::cache::LockableCacheDelta< TCacheDelta >::tryLock ( )
inline

Locks the cache delta.

Note
Returns a falsy structure if the lockable delta is no longer valid.
Here is the call graph for this function:

Member Data Documentation

◆ m_cacheDelta

template<typename TCacheDelta >
TCacheDelta catapult::cache::LockableCacheDelta< TCacheDelta >::m_cacheDelta
private

◆ m_commitCounter

template<typename TCacheDelta >
const size_t& catapult::cache::LockableCacheDelta< TCacheDelta >::m_commitCounter
private

◆ m_initialCommitCount

template<typename TCacheDelta >
size_t catapult::cache::LockableCacheDelta< TCacheDelta >::m_initialCommitCount
private

◆ m_lock

template<typename TCacheDelta >
utils::SpinReaderWriterLock& catapult::cache::LockableCacheDelta< TCacheDelta >::m_lock
private

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