CatapultServer  v0.5.0.1 (Elephant)
MosaicCacheDelta.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "MosaicBaseSets.h"
23 #include "MosaicCacheSerializers.h"
28 
29 namespace catapult { namespace cache {
30 
33  : public PatriciaTreeCacheMixins<MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor> {
37  };
38 
41  : public utils::MoveOnly
51  public:
53 
54  public:
57 
58  public:
61 
62  public:
64  void insert(const state::MosaicEntry& entry);
65 
67  void remove(MosaicId mosaicId);
68 
69  private:
72  };
73 
75  class MosaicCacheDelta : public ReadOnlyViewSupplier<BasicMosaicCacheDelta> {
76  public:
79  {}
80  };
81 }}
catapult::cache::BasicCacheMixins< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor >::MutableAccessor
MutableAccessorMixin< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor > MutableAccessor
Definition: CacheMixinAliases.h:36
catapult::cache::BasicCacheMixins< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor >::Size
SizeMixin< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType > Size
Definition: CacheMixinAliases.h:31
catapult::cache::BasicMosaicCacheDelta::BasicMosaicCacheDelta
BasicMosaicCacheDelta(const MosaicCacheTypes::BaseSetDeltaPointers &mosaicSets)
Creates a delta around mosaicSets.
Definition: MosaicCacheDelta.cpp:46
catapult::cache::BasicInsertRemoveMixin::remove
void remove(const KeyType &key)
Removes the value identified by key from the cache.
Definition: CacheMixins.h:295
catapult::cache::BasicCacheMixins< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor >::DeltaElements
deltaset::DeltaElementsMixin< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType > DeltaElements
Definition: CacheMixinAliases.h:47
catapult::cache::MosaicCacheDeltaMixins
Mixins used by the mosaic cache delta.
Definition: MosaicCacheDelta.h:32
catapult::cache::BasicInsertRemoveMixin::insert
void insert(const ValueType &value)
Inserts value into the cache.
Definition: CacheMixins.h:285
MosaicCacheDelta.h
catapult::cache::MosaicCacheDelta::MosaicCacheDelta
MosaicCacheDelta(const MosaicCacheTypes::BaseSetDeltaPointers &mosaicSets)
Creates a delta around mosaicSets.
Definition: MosaicCacheDelta.h:78
catapult::cache::ReadOnlyViewSupplier
Decorates a view and supplies a read-only view.
Definition: ReadOnlyViewSupplier.h:28
catapult::cache::RemoveIdentifierWithGroup
void RemoveIdentifierWithGroup(TGroupedSet &groupedSet, const TGroupingKey &key, const TIdentifier &identifier)
Removes an identifier with grouping key from groupedSet.
Definition: IdentifierGroupCacheUtils.h:57
catapult::cache::PatriciaTreeCacheMixins< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor >::PatriciaTreeDelta
PatriciaTreeDeltaMixin< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, typename MosaicCacheDescriptor ::PatriciaTree::DeltaType > PatriciaTreeDelta
Definition: CacheMixinAliases.h:54
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::cache::detail::UnorderedMapAdapter::BaseSetDeltaType
typename BaseSetType::DeltaType BaseSetDeltaType
Base set delta type.
Definition: CacheDescriptorAdapters.h:84
ReadOnlyViewSupplier.h
catapult::cache::MosaicCacheDelta
Delta on top of the mosaic cache.
Definition: MosaicCacheDelta.h:75
catapult::cache::BasicMosaicCacheDelta::m_pEntryById
MosaicCacheTypes::PrimaryTypes::BaseSetDeltaPointerType m_pEntryById
Definition: MosaicCacheDelta.h:70
catapult::cache::MosaicCacheTypes::CacheReadOnlyType
ReadOnlyArtifactCache< BasicMosaicCacheView, BasicMosaicCacheDelta, MosaicId, state::MosaicEntry > CacheReadOnlyType
Definition: MosaicCacheTypes.h:76
catapult::state::MosaicEntry
A tuple composed of a mosaic definition and its current state.
Definition: MosaicEntry.h:50
catapult::cache::ReadOnlyArtifactCache
A read-only overlay on top of a cache that provides support for contains, get and isActive.
Definition: MosaicCacheTypes.h:42
ReadOnlyArtifactCache.h
catapult::cache::BasicCacheMixins< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor >::BasicInsertRemove
BasicInsertRemoveMixin< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor > BasicInsertRemove
Definition: CacheMixinAliases.h:45
catapult::utils::BaseValue< uint64_t, MosaicId_tag >
catapult::cache::PatriciaTreeCacheMixins
Grouping of all basic and patricia tree cache mixins for a single set.
Definition: CacheMixinAliases.h:52
catapult::cache::BasicCacheMixins< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor >::Contains
ContainsMixin< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor > Contains
Definition: CacheMixinAliases.h:32
catapult::cache::AddIdentifierWithGroup
void AddIdentifierWithGroup(TGroupedSet &groupedSet, const TGroupingKey &key, const TIdentifier &identifier)
Adds an identifier with with grouping key to groupedSet.
Definition: IdentifierGroupCacheUtils.h:30
catapult::cache::BasicCacheMixins< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor >::ConstAccessor
ConstAccessorMixin< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor > ConstAccessor
Definition: CacheMixinAliases.h:35
catapult::cache::ConstAccessorMixin::find
const_iterator find(const KeyType &key) const
Finds the cache value identified by key.
Definition: CacheMixins.h:207
catapult::cache::BasicMosaicCacheDelta::insert
void insert(const state::MosaicEntry &entry)
Inserts the mosaic entry into the cache.
Definition: MosaicCacheDelta.cpp:60
catapult::cache::MutableAccessorMixin::find
iterator find(const KeyType &key)
Finds the cache value identified by key.
Definition: CacheMixins.h:239
catapult::cache::MosaicBaseSetDeltaPointers
Definition: MosaicBaseSets.h:41
catapult::cache::BasicMosaicCacheDelta
Basic delta on top of the mosaic cache.
Definition: MosaicCacheDelta.h:40
MosaicBaseSets.h
catapult::utils::MoveOnly
A class that can be moved but not copied.
Definition: NonCopyable.h:43
CacheMixinAliases.h
catapult::cache::HeightBasedTouchMixin
A mixin for height-based touching.
Definition: CacheMixins.h:310
Casting.h
catapult::cache::detail::UnorderedMapAdapter::BaseSetDeltaPointerType
std::shared_ptr< BaseSetDeltaType > BaseSetDeltaPointerType
Base set delta pointer type.
Definition: CacheDescriptorAdapters.h:87
IdentifierGroupCacheUtils.h
MosaicCacheSerializers.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::BasicMosaicCacheDelta::remove
void remove(MosaicId mosaicId)
Removes the value identified by mosaicId from the cache.
Definition: MosaicCacheDelta.cpp:65
catapult::cache::BasicCacheMixins< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor >::ActivePredicate
ActivePredicateMixin< MosaicCacheTypes::PrimaryTypes::BaseSetDeltaType, MosaicCacheDescriptor > ActivePredicate
Definition: CacheMixinAliases.h:44
BaseSetDelta.h
catapult::cache::BasicMosaicCacheDelta::m_pMosaicIdsByExpiryHeight
MosaicCacheTypes::HeightGroupingTypes::BaseSetDeltaPointerType m_pMosaicIdsByExpiryHeight
Definition: MosaicCacheDelta.h:71