hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
query_processor_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_QUERY_PROCESSOR_IMPL_HPP
7 #define IROHA_QUERY_PROCESSOR_IMPL_HPP
8 
10 
11 #include <rxcpp/rx-lite.hpp>
12 #include "ametsuchi/storage.hpp"
14 #include "logger/logger_fwd.hpp"
15 
16 namespace iroha {
17  namespace torii {
18 
23  public:
25  std::shared_ptr<ametsuchi::Storage> storage,
26  std::shared_ptr<ametsuchi::QueryExecutorFactory> qry_exec,
27  std::shared_ptr<iroha::PendingTransactionStorage>
28  pending_transactions,
29  std::shared_ptr<shared_model::interface::QueryResponseFactory>
30  response_factory,
31  logger::LoggerPtr log);
32 
33  std::unique_ptr<shared_model::interface::QueryResponse> queryHandle(
34  const shared_model::interface::Query &qry) override;
35 
36  rxcpp::observable<
37  std::shared_ptr<shared_model::interface::BlockQueryResponse>>
39  const shared_model::interface::BlocksQuery &qry) override;
40 
41  private:
42  rxcpp::subjects::subject<
43  std::shared_ptr<shared_model::interface::BlockQueryResponse>>
44  blocks_query_subject_;
45  std::shared_ptr<ametsuchi::Storage> storage_;
46  std::shared_ptr<ametsuchi::QueryExecutorFactory> qry_exec_;
47  std::shared_ptr<iroha::PendingTransactionStorage> pending_transactions_;
48  std::shared_ptr<shared_model::interface::QueryResponseFactory>
49  response_factory_;
50 
51  logger::LoggerPtr log_;
52  };
53 
54  } // namespace torii
55 } // namespace iroha
56 
57 #endif // IROHA_QUERY_PROCESSOR_IMPL_HPP
Definition: command_client.hpp:16
Definition: query.hpp:35
Definition: query_processor_impl.hpp:22
Definition: blocks_query.hpp:20
rxcpp::observable< std::shared_ptr< shared_model::interface::BlockQueryResponse > > blocksQueryHandle(const shared_model::interface::BlocksQuery &qry) override
Definition: query_processor_impl.cpp:56
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:14
std::unique_ptr< shared_model::interface::QueryResponse > queryHandle(const shared_model::interface::Query &qry) override
Definition: query_processor_impl.cpp:43
QueryProcessorImpl(std::shared_ptr< ametsuchi::Storage > storage, std::shared_ptr< ametsuchi::QueryExecutorFactory > qry_exec, std::shared_ptr< iroha::PendingTransactionStorage > pending_transactions, std::shared_ptr< shared_model::interface::QueryResponseFactory > response_factory, logger::LoggerPtr log)
Definition: query_processor_impl.cpp:21
Definition: query_processor.hpp:28