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>
12 #include "common/result.hpp"
14 
15 namespace shared_model {
16  namespace interface {
17  class Block;
18  }
19 } // namespace shared_model
20 
21 namespace iroha {
22  namespace ametsuchi {
23 
24  class MutableStorage;
25 
27  public:
33  virtual expected::Result<std::unique_ptr<MutableStorage>, std::string>
34  createMutableStorage() = 0;
35 
43  virtual boost::optional<std::unique_ptr<LedgerState>> commit(
44  std::unique_ptr<MutableStorage> mutableStorage) = 0;
45 
51  virtual boost::optional<std::unique_ptr<LedgerState>> commitPrepared(
52  const shared_model::interface::Block &block) = 0;
53 
54  virtual ~MutableFactory() = default;
55  };
56 
57  } // namespace ametsuchi
58 } // namespace iroha
59 #endif // IROHA_MUTABLE_FACTORY_HPP
string(REPLACE".""/"CMAKE_SWIG_OUTDIR ${SWIG_JAVA_PKG}) else() set(CMAKE_SWIG_FLAGS"") endif() myswig_add_library(irohajava LANGUAGE java SOURCES bindings.i) unset(CMAKE_SWIG_FLAGS) swig_link_libraries(irohajava $
Definition: CMakeLists.txt:54
Definition: block.hpp:15
Definition: block_query.hpp:16
Definition: command_executor.hpp:12
Definition: mutable_factory.hpp:26