CatapultServer  v0.5.0.1 (Elephant)
HashCacheTypes.h
Go to the documentation of this file.
1 
21 #pragma once
26 
27 namespace catapult {
28  namespace cache {
29  class BasicHashCacheDelta;
30  class BasicHashCacheView;
31  class HashCache;
32  class HashCacheDelta;
33  struct HashCachePrimarySerializer;
34  class HashCacheView;
35 
36  template<typename TCache, typename TCacheDelta, typename TKey>
38  }
39 }
40 
41 namespace catapult { namespace cache {
42 
45  public:
46  static constexpr auto Name = "HashCache";
47 
48  public:
49  // key value types
53 
54  // cache types
58 
59  public:
61  static const auto& GetKeyFromValue(const ValueType& timestampedHash) {
62  return timestampedHash;
63  }
64  };
65 
67  struct HashCacheTypes : public SingleSetCacheTypesAdapter<ImmutableOrderedSetAdapter<HashCacheDescriptor>, std::true_type> {
69 
71  struct Options {
74  };
75  };
76 }}
catapult::cache::HashCache
Synchronized cache composed of timestamped hashes of (transaction) elements.
Definition: HashCache.h:49
catapult::hashcache::HashCache
DECLARE_SERVICE_REGISTRAR() HashCache()
Definition: HashCacheService.cpp:46
catapult::utils::TimeSpan
Represents a time duration.
Definition: TimeSpan.h:30
catapult::cache::HashCacheDescriptor::Name
static constexpr auto Name
Definition: HashCacheTypes.h:46
catapult::cache::HashCacheView
View on top of the hash cache.
Definition: HashCacheView.h:62
catapult::cache::ReadOnlySimpleCache
A read-only overlay on top of a cache that provides support for contains.
Definition: HashCacheTypes.h:37
SingleSetCacheTypesAdapter.h
catapult::cache::HashCacheDescriptor
Describes a hash cache.
Definition: HashCacheTypes.h:44
catapult::cache::HashCacheTypes
Hash cache types.
Definition: HashCacheTypes.h:67
catapult::state::TimestampedHash
Represents a hash with attached timestamp.
Definition: TimestampedHash.h:31
CacheDescriptorAdapters.h
catapult::cache::HashCacheDelta
Delta on top of the hash cache.
Definition: HashCacheDelta.h:65
TimeSpan.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::HashCachePrimarySerializer
Primary serializer for hash cache.
Definition: HashCacheSerializers.h:28
catapult::cache::HashCacheTypes::Options
Custom sub view options.
Definition: HashCacheTypes.h:71
catapult::cache::HashCacheTypes::Options::RetentionTime
utils::TimeSpan RetentionTime
Cache retention time.
Definition: HashCacheTypes.h:73
catapult::cache::HashCacheDescriptor::GetKeyFromValue
static const auto & GetKeyFromValue(const ValueType &timestampedHash)
Gets the key corresponding to timestampedHash.
Definition: HashCacheTypes.h:61
TimestampedHash.h
catapult::cache::SingleSetCacheTypesAdapter
A cache types adapter for a cache composed of a single set.
Definition: SingleSetCacheTypesAdapter.h:31