|
CatapultServer
v0.5.0.1 (Elephant)
|
Decorator that synchronizes access to a cache. More...


Public Types | |
| using | CacheValueType = typename TCache::CacheValueType |
| using | CacheViewType = typename TCache::CacheViewType |
| using | CacheDeltaType = typename TCache::CacheDeltaType |
| using | CacheReadOnlyType = typename TCache::CacheReadOnlyType |
Public Member Functions | |
| SynchronizedCache (TCache &&cache) | |
| Creates a synchronized decorator around cache. More... | |
| LockedCacheView< CacheViewType > | createView () const |
| Returns a locked cache view based on this cache. More... | |
| LockedCacheDelta< CacheDeltaType > | createDelta () |
| LockableCacheDelta< CacheDeltaType > | createDetachedDelta () const |
| void | commit () |
| Commits all pending changes to the underlying storage. More... | |
Protected Member Functions | |
| TCache & | cache () |
| Gets a typed reference to the underlying cache. More... | |
Private Attributes | |
| TCache | m_cache |
| size_t | m_commitCounter |
| std::weak_ptr< detail::CacheViewReadLockPair< CacheDeltaType > > | m_pWeakDeltaPair |
| utils::SpinReaderWriterLock | m_lock |
Decorator that synchronizes access to a cache.
| using catapult::cache::SynchronizedCache< TCache >::CacheDeltaType = typename TCache::CacheDeltaType |
| using catapult::cache::SynchronizedCache< TCache >::CacheReadOnlyType = typename TCache::CacheReadOnlyType |
| using catapult::cache::SynchronizedCache< TCache >::CacheValueType = typename TCache::CacheValueType |
| using catapult::cache::SynchronizedCache< TCache >::CacheViewType = typename TCache::CacheViewType |
|
inlineexplicit |
Creates a synchronized decorator around cache.
|
inlineprotected |
Gets a typed reference to the underlying cache.

|
inline |
Commits all pending changes to the underlying storage.
|
inline |
Returns a locked cache delta based on this cache.
|
inline |
Returns a lockable cache delta based on this cache but without the ability to commit any changes to the original cache.
|
inline |
Returns a locked cache view based on this cache.

|
private |
|
private |
|
mutableprivate |
|
private |