CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
29 namespace catapult {
namespace cache {
64 using CollectedIds = std::unordered_set<NamespaceId, utils::BaseValueHasher<NamespaceId>>;
95 NamespaceCacheTypes::NamespaceCacheTypes::FlatMapTypes::BaseSetDeltaPointerType
m_pNamespaceById;
Height End
End height excluding grace period.
Definition: NamespaceLifetime.h:54
void remove(NamespaceId id)
Removes the namespace specified by its id from the cache.
Definition: NamespaceCacheDelta.cpp:117
void incrementDeepSize(size_t delta=1)
Increments the deep size by delta.
Definition: NamespaceCacheMixins.h:69
SizeMixin< TSet > Size
Definition: CacheMixinAliases.h:31
Basic delta on top of the namespace cache.
Definition: NamespaceCacheDelta.h:53
Definition: NamespaceBaseSets.h:41
void removeRoot(NamespaceId id)
Definition: NamespaceCacheDelta.cpp:129
Mixins used by the namespace delta view.
Definition: NamespaceCacheDelta.h:32
deltaset::DeltaElementsMixin< TSet > DeltaElements
Definition: CacheMixinAliases.h:47
A catapult namespace.
Definition: Namespace.h:30
Height Start
Start height.
Definition: NamespaceLifetime.h:51
Decorates a view and supplies a read-only view.
Definition: ReadOnlyViewSupplier.h:28
NamespaceId rootId() const
Gets the corresponding root namespace id.
Definition: Namespace.h:53
NamespaceId id() const
Gets the namespace id.
Definition: Namespace.h:43
void RemoveIdentifierWithGroup(TGroupedSet &groupedSet, const TGroupingKey &key, const TIdentifier &identifier)
Removes an identifier with grouping key from groupedSet.
Definition: IdentifierGroupCacheUtils.h:57
Mixin that wraps BaseSetDelta and provides a facade on top of BaseSetDelta::deltas().
Definition: DeltaElementsMixin.h:30
PatriciaTreeDeltaMixin< TSet, typename TCacheDescriptor::PatriciaTree::DeltaType > PatriciaTreeDelta
Definition: CacheMixinAliases.h:54
typename BaseSetType::DeltaType BaseSetDeltaType
Base set delta type.
Definition: CacheDescriptorAdapters.h:84
void incrementActiveSize(size_t delta=1)
Increments the active size by delta.
Definition: NamespaceCacheMixins.h:59
void removeChild(const state::Namespace &ns)
Definition: NamespaceCacheDelta.cpp:167
A mixin for calculating the deep size of namespaces.
Definition: NamespaceCacheMixins.h:40
size_t numAllHistoricalChildren() const
Definition: RootNamespaceHistory.cpp:87
void insert(const state::RootNamespace &ns)
Inserts the root namespace ns into the cache.
Definition: NamespaceCacheDelta.cpp:60
A root namespace history.
Definition: RootNamespaceHistory.h:31
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
BasicNamespaceCacheDelta(const NamespaceCacheTypes::BaseSetDeltaPointers &namespaceSets, const NamespaceCacheTypes::Options &options, const NamespaceSizes &namespaceSizes)
Creates a delta around namespaceSets, options and namespaceSizes.
Definition: NamespaceCacheDelta.cpp:43
PrimaryMixins::Size Size
Definition: NamespaceCacheDelta.h:38
A read-only overlay on top of a cache that provides support for contains, get and isActive.
Definition: MosaicCacheTypes.h:42
Definition: NamespaceCacheMixins.h:85
std::unordered_map< NamespaceId, ChildNamespaceData, utils::BaseValueHasher< NamespaceId > > Children
Definition: RootNamespace.h:56
void setAlias(NamespaceId id, const state::NamespaceAlias &alias)
Sets an alias for namespace id.
Definition: NamespaceCacheDelta.cpp:106
Grouping of all basic and patricia tree cache mixins for a single set.
Definition: CacheMixinAliases.h:52
bool empty() const
Gets a value indicating whether or not the history is empty.
Definition: RootNamespaceHistory.cpp:55
ContainsMixin< TSet, TCacheDescriptor > Contains
Definition: CacheMixinAliases.h:32
void AddIdentifierWithGroup(TGroupedSet &groupedSet, const TGroupingKey &key, const TIdentifier &identifier)
Adds an identifier with with grouping key to groupedSet.
Definition: IdentifierGroupCacheUtils.h:30
#define CATAPULT_THROW_RUNTIME_ERROR_1(MESSAGE, PARAM1)
Macro used to throw a catapult runtime error with a single parameter.
Definition: exceptions.h:171
std::unordered_set< NamespaceId, utils::BaseValueHasher< NamespaceId > > CollectedIds
Definition: NamespaceCacheDelta.h:64
InsertResult insert(const ElementType &element)
Definition: BaseSetDelta.h:193
A mixin for adding contains support to a cache.
Definition: CacheMixins.h:54
NamespaceId id() const
Gets the namespace id.
Definition: RootNamespace.cpp:41
Delta on top of the namespace cache.
Definition: NamespaceCacheDelta.h:101
Lifetime of a namespace.
Definition: NamespaceLifetime.h:27
NamespaceCacheTypes::PrimaryTypes::BaseSetDeltaPointerType m_pHistoryById
Definition: NamespaceCacheDelta.h:94
NamespaceCacheTypes::NamespaceCacheTypes::FlatMapTypes::BaseSetDeltaPointerType m_pNamespaceById
Definition: NamespaceCacheDelta.h:95
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
PrimaryMixins::DeltaElements DeltaElements
Definition: NamespaceCacheDelta.h:44
A mixin for adding patricia tree support to a delta cache.
Definition: PatriciaTreeCacheMixins.h:62
A namespace alias.
Definition: NamespaceAlias.h:39
A class that can be moved but not copied.
Definition: NonCopyable.h:43
NamespaceCacheTypes::HeightGroupingTypes::BaseSetDeltaPointerType m_pRootNamespaceIdsByExpiryHeight
Definition: NamespaceCacheDelta.h:96
CollectedIds prune(Height height)
Prunes the namespace cache at height.
Definition: NamespaceCacheDelta.cpp:186
void decrementDeepSize(size_t delta=1)
Decrements the deep size by delta.
Definition: NamespaceCacheMixins.h:74
ReadOnlyArtifactCache< BasicNamespaceCacheView, BasicNamespaceCacheDelta, NamespaceId, state::NamespaceEntry > CacheReadOnlyType
Definition: NamespaceCacheTypes.h:84
A mixin for height-based touching.
Definition: CacheMixins.h:310
void RemoveAll(TContainer &container, const TElements &elements)
Removes all elements from the container (pContainer).
Definition: BaseSetUtils.h:45
void push_back(T val)
Definition: CheckedArray.h:51
void decrementActiveSize(size_t delta=1)
Decrements the active size by delta.
Definition: NamespaceCacheMixins.h:64
std::shared_ptr< BaseSetDeltaType > BaseSetDeltaPointerType
Base set delta pointer type.
Definition: CacheDescriptorAdapters.h:87
Definition: AddressExtractionExtension.cpp:28
A mixin for adding size support to a cache.
Definition: CacheMixins.h:36
const NamespaceLifetime & lifetime() const
Gets a const reference to the lifetime of this namespace.
Definition: RootNamespace.cpp:53
Custom sub view options.
Definition: NamespaceCacheTypes.h:87
size_t historyDepth() const
Gets the root namespace history size.
Definition: RootNamespaceHistory.cpp:63
std::set< NamespaceId > prune(Height height)
Prunes all root namespaces that are not active at height.
Definition: RootNamespaceHistory.cpp:116
Extended namespace sizes.
Definition: NamespaceCacheMixins.h:30
NamespaceCacheDelta(const NamespaceCacheTypes::BaseSetDeltaPointers &namespaceSets, const NamespaceCacheTypes::Options &options, const NamespaceSizes &namespaceSizes)
Creates a delta around namespaceSets, options and namespaceSizes.
Definition: NamespaceCacheDelta.h:104
void push_back(const Key &owner, const NamespaceLifetime &lifetime)
Adds a new root namespace around owner and lifetime at the end of the history.
Definition: RootNamespaceHistory.cpp:91
NamespaceId id() const
Gets the id of the root namespace history.
Definition: RootNamespaceHistory.cpp:59
A root namespace.
Definition: RootNamespace.h:31
size_t numActiveRootChildren() const
Gets the number of children of the most recent root namespace.
Definition: RootNamespaceHistory.cpp:83
Grouping of all basic cache mixins for a single set.
Definition: CacheMixinAliases.h:30
const Key & owner() const
Gets a const reference to the owner of this namespace.
Definition: RootNamespace.cpp:49
BlockDuration m_gracePeriodDuration
Definition: NamespaceCacheDelta.h:97