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

Minimalistic interface for block storage (does not allow block loading). More...

Inheritance diagram for catapult::io::LightBlockStorage:
Collaboration diagram for catapult::io::LightBlockStorage:

Public Member Functions

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

Minimalistic interface for block storage (does not allow block loading).

Constructor & Destructor Documentation

◆ ~LightBlockStorage()

virtual catapult::io::LightBlockStorage::~LightBlockStorage ( )
virtualdefault

Member Function Documentation

◆ chainHeight()

virtual Height catapult::io::LightBlockStorage::chainHeight ( ) const
pure virtual

Gets the number of blocks.

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

Here is the caller graph for this function:

◆ dropBlocksAfter()

virtual void catapult::io::LightBlockStorage::dropBlocksAfter ( Height  height)
pure virtual

Drops all blocks after height.

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

Here is the caller graph for this function:

◆ loadHashesFrom()

virtual model::HashRange catapult::io::LightBlockStorage::loadHashesFrom ( Height  height,
size_t  maxHashes 
) const
pure virtual

Returns a range of at most maxHashes hashes starting at height.

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

Here is the caller graph for this function:

◆ saveBlock()

virtual void catapult::io::LightBlockStorage::saveBlock ( const model::BlockElement blockElement)
pure virtual

Saves blockElement.

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: