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

#include "key_value_storage.hpp"

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

Public Types

using Identifier = uint32_t
using Bytes = std::vector< uint8_t >

Public Member Functions

virtual bool add (Identifier id, const Bytes &blob)=0
virtual boost::optional< Bytesget (Identifier id) const =0
virtual std::string directory () const =0
virtual Identifier last_id () const =0
virtual void dropAll ()=0
virtual ~KeyValueStorage ()=default

Detailed Description

Solid storage interface

Member Typedef Documentation

using iroha::ametsuchi::KeyValueStorage::Bytes = std::vector<uint8_t>

Type of storage key

Constructor & Destructor Documentation

virtual iroha::ametsuchi::KeyValueStorage::~KeyValueStorage ( )

Member Function Documentation

virtual bool iroha::ametsuchi::KeyValueStorage::add ( Identifier  id,
const Bytes blob 
pure virtual

Add entity with binary data

id- reference key
blob- data associated with key

Implemented in iroha::ametsuchi::FlatFile.

virtual std::string iroha::ametsuchi::KeyValueStorage::directory ( ) const
pure virtual
folder of storage

Implemented in iroha::ametsuchi::FlatFile.

virtual void iroha::ametsuchi::KeyValueStorage::dropAll ( )
pure virtual

Implemented in iroha::ametsuchi::FlatFile.

virtual boost::optional<Bytes> iroha::ametsuchi::KeyValueStorage::get ( Identifier  id) const
pure virtual

Get data associated with

id- reference key
- blob, if exists

Implemented in iroha::ametsuchi::FlatFile.

virtual Identifier iroha::ametsuchi::KeyValueStorage::last_id ( ) const
pure virtual
chronologically last not null key

Implemented in iroha::ametsuchi::FlatFile.

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