CatapultServer  v0.5.0.1 (Elephant)
HashCacheSerializers.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult { namespace cache {
26 
29  public:
32  static std::string SerializeValue(const typename state::TimestampedHash&) {
33  return std::string();
34  }
35 
37  static uint64_t KeyToBoundary(const state::TimestampedHash& timestampedHash) {
38  return timestampedHash.Time.unwrap();
39  }
40 
41  // DeserializeValue is not needed because code using it shouldn't be generated for hash cache.
42  };
43 }}
catapult::state::TimestampedHash::Time
Timestamp Time
Timestamp.
Definition: TimestampedHash.h:52
catapult::cache::HashCachePrimarySerializer::KeyToBoundary
static uint64_t KeyToBoundary(const state::TimestampedHash &timestampedHash)
Converts timestampedHash to pruning boundary.
Definition: HashCacheSerializers.h:37
catapult::utils::BasicBaseValue::unwrap
constexpr ValueType unwrap() const
Unwraps this value and returns the underlying raw value.
Definition: BaseValue.h:53
CacheSerializerAdapter.h
catapult::cache::HashCachePrimarySerializer::SerializeValue
static std::string SerializeValue(const typename state::TimestampedHash &)
Definition: HashCacheSerializers.h:32
catapult::state::TimestampedHash
Represents a hash with attached timestamp.
Definition: TimestampedHash.h:31
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::HashCachePrimarySerializer
Primary serializer for hash cache.
Definition: HashCacheSerializers.h:28
TimestampedHash.h