CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
27 namespace catapult {
namespace cache {
30 template<
typename TDescriptor,
typename TCacheTypes>
33 typename TCacheTypes::PrimaryTypes::BaseSetDeltaType,
34 typename TCacheTypes::HeightGroupingTypes::BaseSetDeltaType>;
36 typename TCacheTypes::PrimaryTypes::BaseSetDeltaType,
37 typename TCacheTypes::HeightGroupingTypes::BaseSetDeltaType>;
41 template<
typename TDescriptor,
typename TCacheTypes>
64 ,
LockInfoCacheDeltaMixins<TDescriptor, TCacheTypes>::PatriciaTreeDelta(*lockInfoSets.pPrimary, lockInfoSets.pPatriciaTree)
80 void insert(
const typename TDescriptor::ValueType& value) {
86 void remove(
const typename TDescriptor::KeyType& key) {
88 const auto* pLockInfo = iter.get();
104 typename TCacheTypes::PrimaryTypes::BaseSetDeltaPointerType
m_pDelta;
109 template<
typename TDescriptor,
typename TCacheTypes,
typename TBasicView = BasicLockInfoCacheDelta<TDescriptor, TCacheTypes>>
void remove(const KeyType &key)
Removes the value identified by key from the cache.
Definition: CacheMixins.h:295
void processUnusedExpiredLocks(Height height, const consumer< const typename TDescriptor::ValueType > &consumer) const
Processes all unused lock infos that expired at height by passing them to consumer.
Definition: LockInfoCacheDelta.h:96
void insert(const ValueType &value)
Inserts value into the cache.
Definition: CacheMixins.h:285
BasicLockInfoCacheDelta(const typename TCacheTypes::BaseSetDeltaPointers &lockInfoSets)
Creates a delta around lockInfoSets.
Definition: LockInfoCacheDelta.h:59
Decorates a view and supplies a read-only view.
Definition: ReadOnlyViewSupplier.h:28
void RemoveIdentifierWithGroup(TGroupedSet &groupedSet, const TGroupingKey &key, const TIdentifier &identifier)
Removes an identifier with grouping key from groupedSet.
Definition: IdentifierGroupCacheUtils.h:57
void remove(const typename TDescriptor::KeyType &key)
Removes the value identified by key from the cache.
Definition: LockInfoCacheDelta.h:86
LockInfoCacheDelta(const typename TCacheTypes::BaseSetDeltaPointers &lockInfoSets)
Creates a delta around lockInfoSets.
Definition: LockInfoCacheDelta.h:113
void ForEachIdentifierWithGroup(TSet &set, const TGroupedSet &groupedSet, const TGroupingKey &key, TAction action)
Calls action for each value in set with grouping key according to groupedSet.
Definition: IdentifierGroupCacheUtils.h:41
constexpr const T & as_const(T &ref)
Coerces a reference (ref) to a const reference.
Definition: Casting.h:31
Grouping of all basic and patricia tree cache mixins for a single set.
Definition: CacheMixinAliases.h:52
Basic delta on top of the lock info cache.
Definition: LockInfoCacheDelta.h:42
void AddIdentifierWithGroup(TGroupedSet &groupedSet, const TGroupingKey &key, const TIdentifier &identifier)
Adds an identifier with with grouping key to groupedSet.
Definition: IdentifierGroupCacheUtils.h:30
TCacheTypes::HeightGroupingTypes::BaseSetDeltaPointerType m_pHeightGroupingDelta
Definition: LockInfoCacheDelta.h:105
typename SecretLockInfoCacheTypes ::CacheReadOnlyType ReadOnlyView
Definition: LockInfoCacheDelta.h:55
typename cache::AccountRestrictionCacheTypes::CacheReadOnlyType CacheReadOnlyType
Definition: AddressInteractionValidator.cpp:30
A class that can be moved but not copied.
Definition: NonCopyable.h:43
A mixin for height-based touching.
Definition: CacheMixins.h:310
TCacheTypes::PrimaryTypes::BaseSetDeltaPointerType m_pDelta
Definition: LockInfoCacheDelta.h:104
Definition: AddressExtractionExtension.cpp:28
Mixins used by the lock info cache delta.
Definition: LockInfoCacheDelta.h:31
void insert(const typename TDescriptor::ValueType &value)
Inserts value into the cache.
Definition: LockInfoCacheDelta.h:80
std::function< void(TArgs...)> consumer
A consumer function.
Definition: functions.h:35
A mixin for height-based pruning.
Definition: CacheMixins.h:335
Delta on top of the lock info cache.
Definition: LockInfoCacheDelta.h:110