CatapultServer  v0.5.0.1 (Elephant)
ReadOnlyAccountStateCache.h
Go to the documentation of this file.
1 
21 #pragma once
25 
26 namespace catapult {
27  namespace cache {
28  class BasicAccountStateCacheDelta;
29  class BasicAccountStateCacheView;
30  }
31 }
32 
33 namespace catapult { namespace cache {
34 
37  : public ReadOnlyArtifactCache<BasicAccountStateCacheView, BasicAccountStateCacheDelta, const Address&, state::AccountState>
38  , public ReadOnlyArtifactCache<BasicAccountStateCacheView, BasicAccountStateCacheDelta, const Key&, state::AccountState> {
39  private:
40  template<typename TKey, typename TValue>
42 
45 
46  public:
49 
52 
53  public:
56 
58  uint64_t importanceGrouping() const;
59 
62 
65 
66  public:
70 
72  using KeyBasedCache::find;
73 
74  private:
77  };
78 }}
ReadOnlyAccountStateCache.h
catapult::cache::ReadOnlyAccountStateCache::harvestingMosaicId
MosaicId harvestingMosaicId() const
Gets the harvesting mosaic id.
Definition: ReadOnlyAccountStateCache.cpp:53
AccountStateCacheDelta.h
catapult::cache::ReadOnlyArtifactCache::find
auto find(TKey id) const
Finds the cache value identified by key.
Definition: ReadOnlyArtifactCache.h:85
catapult::cache::ReadOnlyArtifactCache
A read-only overlay on top of a cache that provides support for contains, get and isActive.
Definition: MosaicCacheTypes.h:42
catapult::cache::BasicAccountStateCacheView::minHarvesterBalance
Amount minHarvesterBalance() const
Gets the minimum harvester balance.
Definition: AccountStateCacheView.cpp:65
catapult::cache::ReadOnlyAccountStateCache::networkIdentifier
model::NetworkIdentifier networkIdentifier() const
Gets the network identifier.
Definition: ReadOnlyAccountStateCache.cpp:41
catapult::cache::ReadOnlyAccountStateCache::ReadOnlyAccountStateCache
ReadOnlyAccountStateCache(const BasicAccountStateCacheView &cache)
Creates a read-only overlay on top of cache.
Definition: ReadOnlyAccountStateCache.cpp:27
ReadOnlyArtifactCache.h
catapult::utils::BaseValue< uint64_t, Amount_tag >
AccountStateCacheView.h
catapult::cache::ReadOnlyAccountStateCache::m_pCache
const BasicAccountStateCacheView * m_pCache
Definition: ReadOnlyAccountStateCache.h:75
NetworkInfo.h
catapult::cache::BasicAccountStateCacheView::harvestingMosaicId
MosaicId harvestingMosaicId() const
Gets the harvesting mosaic id.
Definition: AccountStateCacheView.cpp:69
catapult::cache::BasicAccountStateCacheDelta::minHarvesterBalance
Amount minHarvesterBalance() const
Gets the minimum harvester balance.
Definition: AccountStateCacheDelta.cpp:71
catapult::cache::ReadOnlyAccountStateCache::minHarvesterBalance
Amount minHarvesterBalance() const
Gets the minimum harvester balance.
Definition: ReadOnlyAccountStateCache.cpp:49
catapult::cache::BasicAccountStateCacheView::networkIdentifier
model::NetworkIdentifier networkIdentifier() const
Gets the network identifier.
Definition: AccountStateCacheView.cpp:57
catapult::cache::ReadOnlySimpleCache::size
size_t size() const
Returns the number of elements in the cache.
Definition: ReadOnlySimpleCache.h:44
catapult::cache::ReadOnlyAccountStateCache::m_pCacheDelta
const BasicAccountStateCacheDelta * m_pCacheDelta
Definition: ReadOnlyAccountStateCache.h:76
catapult::cache::ReadOnlySimpleCache::contains
bool contains(const TKey &key) const
Definition: ReadOnlySimpleCache.h:50
catapult::cache::BasicAccountStateCacheDelta::networkIdentifier
model::NetworkIdentifier networkIdentifier() const
Gets the network identifier.
Definition: AccountStateCacheDelta.cpp:63
catapult::cache::ReadOnlyAccountStateCache::importanceGrouping
uint64_t importanceGrouping() const
Gets the network importance grouping.
Definition: ReadOnlyAccountStateCache.cpp:45
catapult::cache::BasicAccountStateCacheDelta::harvestingMosaicId
MosaicId harvestingMosaicId() const
Gets the harvesting mosaic id.
Definition: AccountStateCacheDelta.cpp:75
catapult::model::NetworkIdentifier
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
catapult::cache::BasicAccountStateCacheDelta
Basic delta on top of the account state cache.
Definition: AccountStateCacheDelta.h:57
AccountState.h
catapult::cache::BasicAccountStateCacheDelta::importanceGrouping
uint64_t importanceGrouping() const
Gets the network importance grouping.
Definition: AccountStateCacheDelta.cpp:67
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::BasicAccountStateCacheView
Basic view on top of the account state cache.
Definition: AccountStateCacheView.h:53
m_pCacheDelta
std::unique_ptr< cache::CatapultCacheDelta > m_pCacheDelta
Definition: BlockChainSyncConsumer.cpp:112
catapult::cache::ReadOnlyAccountStateCache
A read-only overlay on top of an account cache.
Definition: ReadOnlyAccountStateCache.h:36
catapult::cache::BasicAccountStateCacheView::importanceGrouping
uint64_t importanceGrouping() const
Gets the network importance grouping.
Definition: AccountStateCacheView.cpp:61