CatapultServer  v0.5.0.1 (Elephant)
HashCacheStorage.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "HashCache.h"
24 
25 namespace catapult { namespace cache {
26 
28  struct HashCacheStorage : public CacheStorageForBasicInsertRemoveCache<HashCacheDescriptor> {
30  static void Save(const ValueType& timestampedHash, io::OutputStream& output);
31 
34  };
35 }}
CacheStorageInclude.h
catapult::io::Read
void Read(TIo &input, utils::BasicBaseValue< TValue, TTag, TBaseValue > &value)
Reads base value from input.
Definition: PodIoUtils.h:60
catapult::state::TimestampedHash::Time
Timestamp Time
Timestamp.
Definition: TimestampedHash.h:52
catapult::cache::CacheStorageForBasicInsertRemoveCache
Defines cache storage for cache with basic insert remove support.
Definition: src/catapult/cache/CacheStorageInclude.h:51
HashCache.h
catapult::io::OutputStream::write
virtual void write(const RawBuffer &buffer)=0
catapult::io::InputStream
Reader interface.
Definition: Stream.h:27
catapult::cache::HashCacheStorage
Policy for saving and loading hash cache data.
Definition: HashCacheStorage.h:28
catapult::io::Write
void Write(TIo &output, const utils::BasicBaseValue< TValue, TTag, TBaseValue > &value)
Writes base value into output.
Definition: PodIoUtils.h:30
catapult::state::TimestampedHash
Represents a hash with attached timestamp.
Definition: TimestampedHash.h:31
HashCacheStorage.h
catapult::io::InputStream::read
virtual void read(const MutableRawBuffer &buffer)=0
catapult::cache::HashCacheStorage::Save
static void Save(const ValueType &timestampedHash, io::OutputStream &output)
Saves timestampedHash to output.
Definition: HashCacheStorage.cpp:27
catapult
Definition: AddressExtractionExtension.cpp:28
PodIoUtils.h
catapult::state::TimestampedHash::Hash
HashType Hash
Definition: TimestampedHash.h:56
catapult::cache::CacheStorageFromDescriptor< HashCacheDescriptor >::ValueType
typename HashCacheDescriptor ::ValueType ValueType
Cache value type.
Definition: src/catapult/cache/CacheStorageInclude.h:46
Stream.h
catapult::io::OutputStream
Writer interface.
Definition: Stream.h:41
catapult::cache::HashCacheStorage::Load
static state::TimestampedHash Load(io::InputStream &input)
Loads a single value from input.
Definition: HashCacheStorage.cpp:32