CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace cache {
28 template<
typename TCache,
typename TCacheDelta,
typename TKey,
typename TValue>
29 class ReadOnlyArtifactCache :
public ReadOnlySimpleCache<TCache, TCacheDelta, TKey> {
32 template<
typename TCacheIterator,
typename TCacheDeltaIterator>
53 const TValue&
get()
const {
87 using FindIterator = ReadOnlyFindIterator<decltype(
m_pCache->find(
id)), decltype(
m_pCacheDelta->find(
id))>;
ReadOnlyFindIterator()
Creates an uninitialized iterator.
Definition: ReadOnlyArtifactCache.h:36
TCacheDeltaIterator m_cacheDeltaIter
Definition: ReadOnlyArtifactCache.h:65
ReadOnlyFindIterator(TCacheIterator &&cacheIter)
Creates a find iterator around cacheIter.
Definition: ReadOnlyArtifactCache.h:40
ReadOnlyArtifactCache(const TCache &cache)
Creates a read-only overlay on top of cache.
Definition: ReadOnlyArtifactCache.h:70
Find iterator returned by ReadOnlyArtifactCache::find.
Definition: ReadOnlyArtifactCache.h:33
auto find(TKey id) const
Finds the cache value identified by key.
Definition: ReadOnlyArtifactCache.h:85
const TCacheDelta * m_pCacheDelta
Definition: ReadOnlyArtifactCache.h:98
TCacheIterator m_cacheIter
Definition: ReadOnlyArtifactCache.h:64
A read-only overlay on top of a cache that provides support for contains.
Definition: HashCacheTypes.h:37
const TValue & get() const
Gets a const value.
Definition: ReadOnlyArtifactCache.h:53
const TValue * tryGet() const
Tries to get a const value.
Definition: ReadOnlyArtifactCache.h:58
bool m_hasCacheIter
Definition: ReadOnlyArtifactCache.h:63
ReadOnlyArtifactCache(const TCacheDelta &cache)
Creates a read-only overlay on top of cache.
Definition: ReadOnlyArtifactCache.h:77
ReadOnlyFindIterator(TCacheDeltaIterator &&cacheDeltaIter)
Creates a find iterator around cacheDeltaIter.
Definition: ReadOnlyArtifactCache.h:46
Definition: AddressExtractionExtension.cpp:28
bool isActive(TKey id, Height height) const
Gets a value indicating whether or not an artifact with id is active at height.
Definition: ReadOnlyArtifactCache.h:92
const TCache * m_pCache
Definition: ReadOnlyArtifactCache.h:97