CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
31 namespace catapult {
namespace cache {
34 template<
typename TDescriptor>
43 using KeyType =
typename TDescriptor::KeyType;
50 template<
typename TDescriptor>
53 static void LoadInto(
const typename TDescriptor::ValueType& value,
typename TDescriptor::CacheDeltaType& cacheDelta) {
54 cacheDelta.insert(value);
58 static void Purge(
const typename TDescriptor::ValueType& value,
typename TDescriptor::CacheDeltaType& cacheDelta) {
59 auto key = TDescriptor::GetKeyFromValue(value);
60 if (cacheDelta.contains(key))
61 cacheDelta.remove(key);
Defines cache storage for cache with basic insert remove support.
Definition: src/catapult/cache/CacheStorageInclude.h:51
static void LoadInto(const typename TDescriptor::ValueType &value, typename TDescriptor::CacheDeltaType &cacheDelta)
Loads value into cacheDelta.
Definition: src/catapult/cache/CacheStorageInclude.h:53
typename HashCacheDescriptor ::CacheDeltaType DestinationType
Cache delta type.
Definition: src/catapult/cache/CacheStorageInclude.h:40
static void Purge(const typename TDescriptor::ValueType &value, typename TDescriptor::CacheDeltaType &cacheDelta)
Purges value from cacheDelta.
Definition: src/catapult/cache/CacheStorageInclude.h:58
Defines types for cache storage given a cache descriptor.
Definition: src/catapult/cache/CacheStorageInclude.h:35
Definition: AddressExtractionExtension.cpp:28
typename HashCacheDescriptor ::KeyType KeyType
Cache key type.
Definition: src/catapult/cache/CacheStorageInclude.h:43
typename HashCacheDescriptor ::ValueType ValueType
Cache value type.
Definition: src/catapult/cache/CacheStorageInclude.h:46
typename HashCacheDescriptor ::CacheViewType SourceType
Cache view type.
Definition: src/catapult/cache/CacheStorageInclude.h:37