hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::ametsuchi::Storage Class Referenceabstract

#include "storage.hpp"

Inheritance diagram for iroha::ametsuchi::Storage:
Inheritance graph
Collaboration diagram for iroha::ametsuchi::Storage:
Collaboration graph

Public Member Functions

virtual std::shared_ptr< WsvQuerygetWsvQuery () const =0
 
virtual std::shared_ptr< BlockQuerygetBlockQuery () const =0
 
virtual bool insertBlock (std::shared_ptr< const shared_model::interface::Block > block)=0
 
virtual bool insertBlocks (const std::vector< std::shared_ptr< shared_model::interface::Block >> &blocks)=0
 
virtual rxcpp::observable< std::shared_ptr< const shared_model::interface::Block > > on_commit ()=0
 
virtual void reset ()=0
 
virtual void dropStorage ()=0
 
virtual void freeConnections ()=0
 
virtual ~Storage ()=default
 
- Public Member Functions inherited from iroha::ametsuchi::TemporaryFactory
virtual expected::Result< std::unique_ptr< TemporaryWsv >, std::string > createTemporaryWsv ()=0
 
virtual void prepareBlock (std::unique_ptr< TemporaryWsv > wsv)=0
 
virtual ~TemporaryFactory ()=default
 
- Public Member Functions inherited from iroha::ametsuchi::MutableFactory
virtual expected::Result< std::unique_ptr< MutableStorage >, std::string > createMutableStorage ()=0
 
virtual boost::optional< std::unique_ptr< LedgerState > > commit (std::unique_ptr< MutableStorage > mutableStorage)=0
 
virtual boost::optional< std::unique_ptr< LedgerState > > commitPrepared (std::shared_ptr< const shared_model::interface::Block > block)=0
 
virtual ~MutableFactory ()=default
 
- Public Member Functions inherited from iroha::ametsuchi::PeerQueryFactory
virtual boost::optional< std::shared_ptr< PeerQuery > > createPeerQuery () const =0
 
virtual ~PeerQueryFactory ()=default
 
- Public Member Functions inherited from iroha::ametsuchi::BlockQueryFactory
virtual boost::optional< std::shared_ptr< BlockQuery > > createBlockQuery () const =0
 
virtual ~BlockQueryFactory ()=default
 
- Public Member Functions inherited from iroha::ametsuchi::QueryExecutorFactory
virtual boost::optional< std::shared_ptr< QueryExecutor > > createQueryExecutor (std::shared_ptr< PendingTransactionStorage > pending_txs_storage, std::shared_ptr< shared_model::interface::QueryResponseFactory > response_factory) const =0
 
virtual ~QueryExecutorFactory ()=default
 

Detailed Description

Storage interface, which allows queries on current committed state, and creation of state which can be mutated with blocks and transactions

Constructor & Destructor Documentation

virtual iroha::ametsuchi::Storage::~Storage ( )
virtualdefault

Member Function Documentation

virtual void iroha::ametsuchi::Storage::dropStorage ( )
pure virtual

Remove all information from ledger Tables and the database will be removed too

Implemented in iroha::ametsuchi::StorageImpl.

virtual void iroha::ametsuchi::Storage::freeConnections ( )
pure virtual
virtual std::shared_ptr<BlockQuery> iroha::ametsuchi::Storage::getBlockQuery ( ) const
pure virtual

Implemented in iroha::ametsuchi::StorageImpl.

Here is the caller graph for this function:

virtual std::shared_ptr<WsvQuery> iroha::ametsuchi::Storage::getWsvQuery ( ) const
pure virtual
virtual bool iroha::ametsuchi::Storage::insertBlock ( std::shared_ptr< const shared_model::interface::Block block)
pure virtual

Raw insertion of blocks without validation

Parameters
block- block for insertion
Returns
true if inserted

Implemented in iroha::ametsuchi::StorageImpl.

virtual bool iroha::ametsuchi::Storage::insertBlocks ( const std::vector< std::shared_ptr< shared_model::interface::Block >> &  blocks)
pure virtual

Raw insertion of blocks without validation

Parameters
blocks- collection of blocks for insertion
Returns
true if inserted

Implemented in iroha::ametsuchi::StorageImpl.

Here is the caller graph for this function:

virtual rxcpp::observable< std::shared_ptr<const shared_model::interface::Block> > iroha::ametsuchi::Storage::on_commit ( )
pure virtual

method called when block is written to the storage

Returns
observable with the Block committed

Implemented in iroha::ametsuchi::StorageImpl.

virtual void iroha::ametsuchi::Storage::reset ( )
pure virtual

Remove all records from the tables and remove all the blocks

Implemented in iroha::ametsuchi::StorageImpl.

Here is the caller graph for this function:


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