hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
mutable_factory.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_MUTABLE_FACTORY_HPP
7 #define IROHA_MUTABLE_FACTORY_HPP
8 
9 #include <memory>
10 
11 #include <boost/optional.hpp>
14 #include "common/result_fwd.hpp"
15 
16 namespace shared_model {
17  namespace interface {
18  class Block;
19  }
20 } // namespace shared_model
21 
22 namespace iroha {
23  namespace ametsuchi {
24 
25  class MutableStorage;
26 
28  public:
35  std::string>
36  createMutableStorage(
37  std::shared_ptr<CommandExecutor> command_executor) = 0;
38 
46  virtual CommitResult commit(
47  std::unique_ptr<MutableStorage> mutableStorage) = 0;
48 
50  virtual bool preparedCommitEnabled() const = 0;
51 
57  virtual CommitResult commitPrepared(
58  std::shared_ptr<const shared_model::interface::Block> block) = 0;
59 
60  virtual ~MutableFactory() = default;
61  };
62 
63  } // namespace ametsuchi
64 } // namespace iroha
65 #endif // IROHA_MUTABLE_FACTORY_HPP
Definition: block_query.hpp:17
Definition: result_fwd.hpp:27
Definition: block_query.hpp:15
Definition: command_executor.hpp:13
Definition: mutable_factory.hpp:27