CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy > Class Template Reference

A delegating proxy around a memory-based cache. More...

Inheritance diagram for catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >:
Collaboration diagram for catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >:

Public Member Functions

 MemoryCacheProxy (const MemoryCacheOptions &options)
 Creates a proxy around options. More...
 
template<typename TMutableCacheFactory , typename... TArgs>
 MemoryCacheProxy (const MemoryCacheOptions &options, TMutableCacheFactory factory, TArgs &&... args)
 
auto view () const
 Gets a read only view based on this cache. More...
 
 operator const TMemoryCache & () const
 Implicitly casts this proxy to a (const) memory cache. More...
 
TCacheModifierProxy modifier () override
 

Private Attributes

TMemoryCache m_memoryCache
 
std::unique_ptr< TCache > m_pMutableCache
 
TCache * m_pCache
 

Detailed Description

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
class catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >

A delegating proxy around a memory-based cache.

Constructor & Destructor Documentation

◆ MemoryCacheProxy() [1/2]

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >::MemoryCacheProxy ( const MemoryCacheOptions options)
inlineexplicit

Creates a proxy around options.

◆ MemoryCacheProxy() [2/2]

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
template<typename TMutableCacheFactory , typename... TArgs>
catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >::MemoryCacheProxy ( const MemoryCacheOptions options,
TMutableCacheFactory  factory,
TArgs &&...  args 
)
inlineexplicit

Creates a proxy around options and the write-only cache created by factory with args arguments.

Member Function Documentation

◆ modifier()

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
TCacheModifierProxy catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >::modifier ( )
inlineoverride
Here is the caller graph for this function:

◆ operator const TMemoryCache &()

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >::operator const TMemoryCache & ( ) const
inline

Implicitly casts this proxy to a (const) memory cache.

◆ view()

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
auto catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >::view ( ) const
inline

Gets a read only view based on this cache.

Here is the caller graph for this function:

Member Data Documentation

◆ m_memoryCache

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
TMemoryCache catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >::m_memoryCache
private

◆ m_pCache

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
TCache* catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >::m_pCache
private

◆ m_pMutableCache

template<typename TMemoryCache, typename TCache, typename TCacheModifierProxy>
std::unique_ptr<TCache> catapult::cache::MemoryCacheProxy< TMemoryCache, TCache, TCacheModifierProxy >::m_pMutableCache
private

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