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

#include "indexer.hpp"

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

Classes

struct  TxPosition
 Position of a transaction in the ledger. More...
 

Public Member Functions

virtual ~Indexer ()=default
 
virtual void committedTxHash (const TxPosition &position, shared_model::interface::types::TimestampType const ts, const shared_model::interface::types::HashType &committed_tx_hash)=0
 Store a committed tx hash. More...
 
virtual void rejectedTxHash (const TxPosition &position, shared_model::interface::types::TimestampType const ts, const shared_model::interface::types::HashType &rejected_tx_hash)=0
 Store a rejected tx hash. More...
 
virtual void txPositions (shared_model::interface::types::AccountIdType const &creator, shared_model::interface::types::HashType const &hash, boost::optional< shared_model::interface::types::AssetIdType > &&asset_id, shared_model::interface::types::TimestampType const ts, TxPosition const &position)=0
 Index tx info. More...
 
virtual iroha::expected::Result< void, std::string > flush ()=0
 

Detailed Description

Stores transaction data in WSV.

Attention
The effect of any change only gets into WSV storage after
See also
Indexer::flush() is called!

Constructor & Destructor Documentation

◆ ~Indexer()

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

Member Function Documentation

◆ committedTxHash()

virtual void iroha::ametsuchi::Indexer::committedTxHash ( const TxPosition position,
shared_model::interface::types::TimestampType const  ts,
const shared_model::interface::types::HashType committed_tx_hash 
)
pure virtual

Store a committed tx hash.

Implemented in iroha::ametsuchi::PostgresIndexer, and iroha::ametsuchi::RocksDBIndexer.

◆ flush()

virtual iroha::expected::Result<void, std::string> iroha::ametsuchi::Indexer::flush ( )
pure virtual

Flush the indices to storage. Makes the effects of new indices (that were created before this call) visible to other components. Discards indexer inner state on success.

Returns
Void Value on success, string Error on failure.

Implemented in iroha::ametsuchi::PostgresIndexer, and iroha::ametsuchi::RocksDBIndexer.

◆ rejectedTxHash()

virtual void iroha::ametsuchi::Indexer::rejectedTxHash ( const TxPosition position,
shared_model::interface::types::TimestampType const  ts,
const shared_model::interface::types::HashType rejected_tx_hash 
)
pure virtual

Store a rejected tx hash.

Implemented in iroha::ametsuchi::PostgresIndexer, and iroha::ametsuchi::RocksDBIndexer.

◆ txPositions()

virtual void iroha::ametsuchi::Indexer::txPositions ( shared_model::interface::types::AccountIdType const &  creator,
shared_model::interface::types::HashType const &  hash,
boost::optional< shared_model::interface::types::AssetIdType > &&  asset_id,
shared_model::interface::types::TimestampType const  ts,
TxPosition const &  position 
)
pure virtual

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