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

#include "mutable_factory.hpp"

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

Public Member Functions

virtual std::unique_ptr< MutableStoragecreateMutableStorage (std::shared_ptr< CommandExecutor > command_executor)=0
virtual CommitResult commit (std::unique_ptr< MutableStorage > mutableStorage)=0
virtual bool preparedCommitEnabled () const =0
 Check if prepared commits are enabled. More...
virtual CommitResult commitPrepared (std::shared_ptr< const shared_model::interface::Block > block)=0
virtual ~MutableFactory ()=default

Constructor & Destructor Documentation

◆ ~MutableFactory()

virtual iroha::ametsuchi::MutableFactory::~MutableFactory ( )

Member Function Documentation

◆ commit()

virtual CommitResult iroha::ametsuchi::MutableFactory::commit ( std::unique_ptr< MutableStorage mutableStorage)
pure virtual

Commit mutable storage to Ametsuchi. This transforms Ametsuchi to the new state consistent with MutableStorage.

the status of commit

Implemented in iroha::ametsuchi::StorageImpl.

◆ commitPrepared()

virtual CommitResult iroha::ametsuchi::MutableFactory::commitPrepared ( std::shared_ptr< const shared_model::interface::Block block)
pure virtual

Try to apply prepared block to Ametsuchi.

blockThe previously prepared block that will be committed now.
Result of committing the prepared block.

Implemented in iroha::ametsuchi::StorageImpl.

◆ createMutableStorage()

virtual std::unique_ptr<MutableStorage> iroha::ametsuchi::MutableFactory::createMutableStorage ( std::shared_ptr< CommandExecutor command_executor)
pure virtual

Creates a mutable storage from the current state. Mutable storage is the only way to commit the block to the ledger.

Created mutable storage

Implemented in iroha::ametsuchi::StorageImpl.

◆ preparedCommitEnabled()

virtual bool iroha::ametsuchi::MutableFactory::preparedCommitEnabled ( ) const
pure virtual

Check if prepared commits are enabled.

Implemented in iroha::ametsuchi::StorageImpl.

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