#include "storage_impl.hpp"


Public Member Functions | |
| expected::Result< std::unique_ptr< CommandExecutor >, std::string > | createCommandExecutor () override |
| std::unique_ptr< TemporaryWsv > | createTemporaryWsv (std::shared_ptr< CommandExecutor > command_executor) override |
| iroha::expected::Result< std::unique_ptr< MutableStorage >, std::string > | createMutableStorage (std::shared_ptr< CommandExecutor > command_executor) override |
| boost::optional< std::shared_ptr< PeerQuery > > | createPeerQuery () const override |
| boost::optional< std::shared_ptr< BlockQuery > > | createBlockQuery () const override |
| boost::optional< std::unique_ptr< SettingQuery > > | createSettingQuery () const override |
| iroha::expected::Result< std::unique_ptr< QueryExecutor >, std::string > | createQueryExecutor (std::shared_ptr< PendingTransactionStorage > pending_txs_storage, std::shared_ptr< shared_model::interface::QueryResponseFactory > response_factory) const override |
| iroha::expected::Result< void, std::string > | insertBlock (std::shared_ptr< const shared_model::interface::Block > block) override |
| expected::Result< void, std::string > | insertPeer (const shared_model::interface::Peer &peer) override |
| iroha::expected::Result< std::unique_ptr< MutableStorage >, std::string > | createMutableStorage (std::shared_ptr< CommandExecutor > command_executor, BlockStorageFactory &storage_factory) override |
| void | resetPeers () override |
| expected::Result< void, std::string > | dropBlockStorage () override |
| boost::optional< std::shared_ptr< const iroha::LedgerState > > | getLedgerState () const override |
| void | freeConnections () override |
| CommitResult | commit (std::unique_ptr< MutableStorage > mutable_storage) override |
| bool | preparedCommitEnabled () const override |
| Check if prepared commits are enabled. More... | |
| CommitResult | commitPrepared (std::shared_ptr< const shared_model::interface::Block > block) override |
| std::shared_ptr< WsvQuery > | getWsvQuery () const override |
| std::shared_ptr< BlockQuery > | getBlockQuery () const override |
| rxcpp::observable< std::shared_ptr< const shared_model::interface::Block > > | on_commit () override |
| void | prepareBlock (std::unique_ptr< TemporaryWsv > wsv) override |
| ~StorageImpl () override | |
Public Member Functions inherited from iroha::ametsuchi::Storage | |
| virtual | ~Storage ()=default |
Public Member Functions inherited from iroha::ametsuchi::TemporaryFactory | |
| virtual | ~TemporaryFactory ()=default |
Public Member Functions inherited from iroha::ametsuchi::MutableFactory | |
| virtual | ~MutableFactory ()=default |
Public Member Functions inherited from iroha::ametsuchi::PeerQueryFactory | |
| virtual | ~PeerQueryFactory ()=default |
Public Member Functions inherited from iroha::ametsuchi::BlockQueryFactory | |
| virtual | ~BlockQueryFactory ()=default |
Public Member Functions inherited from iroha::ametsuchi::QueryExecutorFactory | |
| virtual | ~QueryExecutorFactory ()=default |
Public Member Functions inherited from iroha::ametsuchi::SettingQueryFactory | |
| virtual | ~SettingQueryFactory ()=default |
Static Public Member Functions | |
| static expected::Result< std::shared_ptr< StorageImpl >, std::string > | create (const PostgresOptions &postgres_options, std::shared_ptr< PoolWrapper > pool_wrapper, std::shared_ptr< shared_model::interface::PermissionToString > perm_converter, std::shared_ptr< PendingTransactionStorage > pending_txs_storage, std::shared_ptr< shared_model::interface::QueryResponseFactory > query_response_factory, std::unique_ptr< BlockStorageFactory > temporary_block_storage_factory, std::shared_ptr< BlockStorage > persistent_block_storage, std::optional< std::reference_wrapper< const VmCaller >> vm_caller_ref, logger::LoggerManagerTreePtr log_manager, size_t pool_size=10) |
Protected Member Functions | |
| StorageImpl (boost::optional< std::shared_ptr< const iroha::LedgerState >> ledger_state, const PostgresOptions &postgres_options, std::shared_ptr< BlockStorage > block_store, std::shared_ptr< PoolWrapper > pool_wrapper, std::shared_ptr< shared_model::interface::PermissionToString > perm_converter, std::shared_ptr< PendingTransactionStorage > pending_txs_storage, std::shared_ptr< shared_model::interface::QueryResponseFactory > query_response_factory, std::unique_ptr< BlockStorageFactory > temporary_block_storage_factory, size_t pool_size, std::optional< std::reference_wrapper< const VmCaller >> vm_caller, logger::LoggerManagerTreePtr log_manager) | |
Friends | |
| class | ::iroha::ametsuchi::AmetsuchiTest |
|
override |

|
protected |

|
overridevirtual |
Commit mutable storage to Ametsuchi. This transforms Ametsuchi to the new state consistent with MutableStorage.
| mutableStorage |
Implements iroha::ametsuchi::MutableFactory.

|
overridevirtual |
Try to apply prepared block to Ametsuchi.
| block | The previously prepared block that will be committed now. |
Implements iroha::ametsuchi::MutableFactory.

|
static |

|
overridevirtual |
Creates a block query from the current state.
Implements iroha::ametsuchi::BlockQueryFactory.

|
overridevirtual |
Create new command executor that holds a database session within.
Implements iroha::ametsuchi::Storage.

|
overridevirtual |
Creates a mutable storage from the current state. Mutable storage is the only way to commit the block to the ledger.
Implements iroha::ametsuchi::MutableFactory.

|
overridevirtual |
Creates a mutable storage from the current state
Implements iroha::ametsuchi::Storage.

|
overridevirtual |
Creates a peer query from the current state.
Implements iroha::ametsuchi::PeerQueryFactory.

|
overridevirtual |
Creates a query executor from the current state
Implements iroha::ametsuchi::QueryExecutorFactory.
|
overridevirtual |
Creates a setting query
Implements iroha::ametsuchi::SettingQueryFactory.
|
overridevirtual |
Creates a temporary world state view from the current state. Temporary state will be not committed and will be erased on destructor call. Temporary state might be used for transaction validation.
Implements iroha::ametsuchi::TemporaryFactory.
|
overridevirtual |
Remove all blocks from block storage.
Implements iroha::ametsuchi::Storage.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Implements iroha::ametsuchi::Storage.
|
overridevirtual |
|
overridevirtual |
Raw insertion of blocks without validation
| block | - block for insertion |
Implements iroha::ametsuchi::Storage.

|
overridevirtual |
Insert a peer into WSV
| peer | - peer to insert |
Implements iroha::ametsuchi::Storage.

|
overridevirtual |
method called when block is written to the storage
Implements iroha::ametsuchi::Storage.
|
overridevirtual |
Prepare state which was accumulated in temporary WSV. After preparation, this state is not visible until commited.
| wsv | - state which will be prepared. |
Implements iroha::ametsuchi::TemporaryFactory.
|
overridevirtual |
Check if prepared commits are enabled.
Implements iroha::ametsuchi::MutableFactory.
|
overridevirtual |
Removes all peers from WSV
Implements iroha::ametsuchi::Storage.

|
friend |