CatapultServer  v0.5.0.1 (Elephant)
catapult::io::PrunableBlockStorage Class Referenceabstract

Interface that allows saving, loading and pruning blocks. More...

Inheritance diagram for catapult::io::PrunableBlockStorage:
Collaboration diagram for catapult::io::PrunableBlockStorage:

Public Member Functions

virtual void purge ()=0
 Purges all blocks from storage. More...
 
- Public Member Functions inherited from catapult::io::BlockStorage
virtual std::shared_ptr< const model::BlockloadBlock (Height height) const =0
 Returns the block at height. More...
 
virtual std::shared_ptr< const model::BlockElementloadBlockElement (Height height) const =0
 Returns the block element (owning a block) at height. More...
 
virtual std::pair< std::vector< uint8_t >, bool > loadBlockStatementData (Height height) const =0
 Returns the optional block statement data at height. More...
 
- Public Member Functions inherited from catapult::io::LightBlockStorage
virtual ~LightBlockStorage ()=default
 
virtual Height chainHeight () const =0
 Gets the number of blocks. More...
 
virtual model::HashRange loadHashesFrom (Height height, size_t maxHashes) const =0
 Returns a range of at most maxHashes hashes starting at height. More...
 
virtual void saveBlock (const model::BlockElement &blockElement)=0
 Saves blockElement. More...
 
virtual void dropBlocksAfter (Height height)=0
 Drops all blocks after height. More...
 
- Public Member Functions inherited from catapult::utils::NonCopyable
constexpr NonCopyable ()=default
 Default constructor. More...
 
 ~NonCopyable ()=default
 Default destructor. More...
 
 NonCopyable (const NonCopyable &)=delete
 Disabled copy constructor. More...
 
NonCopyableoperator= (const NonCopyable &)=delete
 Disabled assignment operator. More...
 

Detailed Description

Interface that allows saving, loading and pruning blocks.

Member Function Documentation

◆ purge()

virtual void catapult::io::PrunableBlockStorage::purge ( )
pure virtual

Purges all blocks from storage.

Implemented in catapult::io::FileBlockStorage, and catapult::extensions::MemoryBlockStorage.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: