CatapultServer
v0.5.0.1 (Elephant)
|
A write only view on top of block storage. More...
Public Member Functions | |
BlockStorageModifier (BlockStorage &storage, PrunableBlockStorage &stagingStorage, utils::SpinReaderWriterLock::ReaderLockGuard &&readLock, CachedData &cachedData) | |
Creates a view around storage, stagingStorage and cache data (cachedData) with lock context readLock. More... | |
void | saveBlock (const model::BlockElement &blockElement) |
Saves a block element (blockElement). More... | |
void | saveBlocks (const std::vector< model::BlockElement > &blockElements) |
Saves multiple block elements (blockElements). More... | |
void | dropBlocksAfter (Height height) |
Drops all blocks after height. More... | |
void | commit () |
Commits all staged changes to the primary storage. More... | |
Additional Inherited Members | |
Private Member Functions inherited from catapult::utils::MoveOnly | |
constexpr | MoveOnly ()=default |
Default constructor. More... | |
~MoveOnly ()=default | |
Default destructor. More... | |
MoveOnly (const NonCopyable &)=delete | |
Disabled copy constructor. More... | |
MoveOnly (MoveOnly &&)=default | |
Default move constructor. More... | |
MoveOnly & | operator= (const MoveOnly &)=delete |
Disabled assignment operator. More... | |
MoveOnly & | operator= (MoveOnly &&)=default |
Default move assignment operator. More... | |
A write only view on top of block storage.
catapult::io::BlockStorageModifier::BlockStorageModifier | ( | BlockStorage & | storage, |
PrunableBlockStorage & | stagingStorage, | ||
utils::SpinReaderWriterLock::ReaderLockGuard && | readLock, | ||
CachedData & | cachedData | ||
) |
Creates a view around storage, stagingStorage and cache data (cachedData) with lock context readLock.
void catapult::io::BlockStorageModifier::commit | ( | ) |
Commits all staged changes to the primary storage.
void catapult::io::BlockStorageModifier::dropBlocksAfter | ( | Height | height | ) |
Drops all blocks after height.
void catapult::io::BlockStorageModifier::saveBlock | ( | const model::BlockElement & | blockElement | ) |
Saves a block element (blockElement).
void catapult::io::BlockStorageModifier::saveBlocks | ( | const std::vector< model::BlockElement > & | blockElements | ) |
Saves multiple block elements (blockElements).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |