hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
mutable_storage.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_MUTABLE_STORAGE_HPP
7 #define IROHA_MUTABLE_STORAGE_HPP
8 
9 #include <functional>
10 
11 #include <rxcpp/rx.hpp>
13 
14 namespace shared_model {
15  namespace interface {
16  class Block;
17  } // namespace interface
18 } // namespace shared_model
19 
20 namespace iroha {
21  namespace ametsuchi {
22 
23  class WsvQuery;
24  class PeerQuery;
25 
31  public:
39  using MutableStoragePredicate = std::function<bool(
40  std::shared_ptr<const shared_model::interface::Block>,
41  // TODO 30.01.2019 lebdron: IR-265 Remove PeerQueryFactory
42  PeerQuery &,
44 
49  virtual bool apply(
50  std::shared_ptr<const shared_model::interface::Block> block) = 0;
51 
60  virtual bool apply(
61  rxcpp::observable<std::shared_ptr<shared_model::interface::Block>>
62  blocks,
63  MutableStoragePredicate predicate) = 0;
64 
65  virtual ~MutableStorage() = default;
66  };
67 
68  } // namespace ametsuchi
69 } // namespace iroha
70 
71 #endif // IROHA_MUTABLE_STORAGE_HPP
decltype(auto) constexpr apply(Tuple &&t, F &&f)
apply F to Tuple
Definition: soci_utils.hpp:72
Definition: hash.hpp:18
Definition: peer_query.hpp:25
Definition: block_query.hpp:16
Definition: mutable_storage.hpp:30
std::function< bool(std::shared_ptr< const shared_model::interface::Block >, PeerQuery &, const shared_model::interface::types::HashType &)> MutableStoragePredicate
Definition: mutable_storage.hpp:43
Definition: command_executor.hpp:12