CatapultServer
v0.5.0.1 (Elephant)
|
A patricia tree memory data source that reads through but does not write through. More...
Public Member Functions | |
ReadThroughMemoryDataSource (const TBackingDataSource &backingDataSource, DataSourceVerbosity verbosity=DataSourceVerbosity::Off) | |
Creates a data source around backingDataSource with specified verbosity. More... | |
size_t | size () const |
Gets the number of saved nodes in the in memory cache. More... | |
std::unique_ptr< const TreeNode > | get (const Hash256 &hash) const |
Gets the tree node associated with hash. More... | |
void | forEach (const consumer< const TreeNode & > &consumer) const |
Gets all nodes in memory and passes them to consumer. More... | |
void | set (const LeafTreeNode &node) |
Saves a leaf tree node. More... | |
void | set (const BranchTreeNode &node) |
Saves a branch tree node. More... | |
void | clear () |
Clears all cached memory nodes. More... | |
Private Attributes | |
const TBackingDataSource & | m_backingDataSource |
MemoryDataSource | m_memoryDataSource |
A patricia tree memory data source that reads through but does not write through.
|
inlineexplicit |
Creates a data source around backingDataSource with specified verbosity.
|
inline |
Clears all cached memory nodes.
|
inline |
Gets all nodes in memory and passes them to consumer.
|
inline |
Gets the tree node associated with hash.
|
inline |
Saves a branch tree node.
|
inline |
Saves a leaf tree node.
|
inline |
Gets the number of saved nodes in the in memory cache.
|
private |
|
private |