CatapultServer  v0.5.0.1 (Elephant)
AccountRestrictionCacheDelta.h
Go to the documentation of this file.
1 
21 #pragma once
28 
29 namespace catapult { namespace cache {
30 
34 
37  : public utils::MoveOnly
45  public:
47 
48  public:
53  : AccountRestrictionCacheDeltaMixins::Size(*restrictionSets.pPrimary)
54  , AccountRestrictionCacheDeltaMixins::Contains(*restrictionSets.pPrimary)
55  , AccountRestrictionCacheDeltaMixins::ConstAccessor(*restrictionSets.pPrimary)
56  , AccountRestrictionCacheDeltaMixins::MutableAccessor(*restrictionSets.pPrimary)
57  , AccountRestrictionCacheDeltaMixins::PatriciaTreeDelta(*restrictionSets.pPrimary, restrictionSets.pPatriciaTree)
58  , AccountRestrictionCacheDeltaMixins::BasicInsertRemove(*restrictionSets.pPrimary)
59  , AccountRestrictionCacheDeltaMixins::DeltaElements(*restrictionSets.pPrimary)
60  , m_pAccountRestrictionEntries(restrictionSets.pPrimary)
62  {}
63 
64  public:
67 
68  public:
71  return m_networkIdentifier;
72  }
73 
74  private:
77  };
78 
80  class AccountRestrictionCacheDelta : public ReadOnlyViewSupplier<BasicAccountRestrictionCacheDelta> {
81  public:
86  : ReadOnlyViewSupplier(restrictionSets, networkIdentifier)
87  {}
88  };
89 }}
catapult::cache::AccountRestrictionCacheDelta::AccountRestrictionCacheDelta
AccountRestrictionCacheDelta(const AccountRestrictionCacheTypes::BaseSetDeltaPointers &restrictionSets, model::NetworkIdentifier networkIdentifier)
Creates a delta around restrictionSets and networkIdentifier.
Definition: AccountRestrictionCacheDelta.h:83
catapult::cache::BasicCacheMixins::MutableAccessor
MutableAccessorMixin< TSet, TCacheDescriptor > MutableAccessor
Definition: CacheMixinAliases.h:36
catapult::cache::BasicAccountRestrictionCacheDelta::m_pAccountRestrictionEntries
AccountRestrictionCacheTypes::PrimaryTypes::BaseSetDeltaPointerType m_pAccountRestrictionEntries
Definition: AccountRestrictionCacheDelta.h:75
catapult::cache::AccountRestrictionCacheTypes::CacheReadOnlyType
ReadOnlyArtifactCache< BasicAccountRestrictionCacheView, BasicAccountRestrictionCacheDelta, const Address &, state::AccountRestrictions > CacheReadOnlyType
Definition: AccountRestrictionCacheTypes.h:79
catapult::cache::BasicCacheMixins::DeltaElements
deltaset::DeltaElementsMixin< TSet > DeltaElements
Definition: CacheMixinAliases.h:47
catapult::cache::ReadOnlyViewSupplier
Decorates a view and supplies a read-only view.
Definition: ReadOnlyViewSupplier.h:28
catapult::cache::AccountRestrictionCacheDelta
Delta on top of the account restriction cache.
Definition: AccountRestrictionCacheDelta.h:80
ReadOnlyViewSupplier.h
catapult::cache::BasicInsertRemoveMixin
A mixin for adding basic insert and remove support to a cache.
Definition: CacheMixins.h:273
catapult::cache::BasicAccountRestrictionCacheDelta
Basic delta on top of the account restriction cache.
Definition: AccountRestrictionCacheDelta.h:36
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::PatriciaTreeCacheMixins
Grouping of all basic and patricia tree cache mixins for a single set.
Definition: CacheMixinAliases.h:52
catapult::cache::ConstAccessorMixin
A mixin for adding const access support to a cache.
Definition: CacheMixins.h:190
NetworkInfo.h
catapult::cache::BasicCacheMixins::Contains
ContainsMixin< TSet, TCacheDescriptor > Contains
Definition: CacheMixinAliases.h:32
catapult::cache::BasicAccountRestrictionCacheDelta::networkIdentifier
model::NetworkIdentifier networkIdentifier() const
Gets the network identifier.
Definition: AccountRestrictionCacheDelta.h:70
catapult::cache::BasicAccountRestrictionCacheDelta::BasicAccountRestrictionCacheDelta
BasicAccountRestrictionCacheDelta(const AccountRestrictionCacheTypes::BaseSetDeltaPointers &restrictionSets, model::NetworkIdentifier networkIdentifier)
Creates a delta around restrictionSets and networkIdentifier.
Definition: AccountRestrictionCacheDelta.h:50
catapult::cache::ConstAccessorMixin::find
const_iterator find(const KeyType &key) const
Finds the cache value identified by key.
Definition: CacheMixins.h:207
catapult::cache::MutableAccessorMixin::find
iterator find(const KeyType &key)
Finds the cache value identified by key.
Definition: CacheMixins.h:239
catapult::cache::PatriciaTreeDeltaMixin
A mixin for adding patricia tree support to a delta cache.
Definition: PatriciaTreeCacheMixins.h:62
catapult::utils::MoveOnly
A class that can be moved but not copied.
Definition: NonCopyable.h:43
CacheMixinAliases.h
catapult::model::NetworkIdentifier
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
catapult::cache::detail::UnorderedMapAdapter::BaseSetDeltaPointerType
std::shared_ptr< BaseSetDeltaType > BaseSetDeltaPointerType
Base set delta pointer type.
Definition: CacheDescriptorAdapters.h:87
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::AccountRestrictionCacheDeltaMixins
PatriciaTreeCacheMixins< AccountRestrictionCacheTypes::PrimaryTypes::BaseSetDeltaType, AccountRestrictionCacheDescriptor > AccountRestrictionCacheDeltaMixins
Mixins used by the account restriction cache delta.
Definition: AccountRestrictionCacheDelta.h:33
catapult::cache::SizeMixin
A mixin for adding size support to a cache.
Definition: CacheMixins.h:36
catapult::cache::AccountRestrictionBaseSetDeltaPointers
Definition: AccountRestrictionBaseSets.h:45
AccountRestrictionBaseSets.h
BaseSetDelta.h
catapult::cache::BasicAccountRestrictionCacheDelta::m_networkIdentifier
model::NetworkIdentifier m_networkIdentifier
Definition: AccountRestrictionCacheDelta.h:76