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 
9 #include "ametsuchi/storage.hpp"
11 #include "logger/logger.hpp"
13 
14 namespace iroha {
15  namespace torii {
16 
21  public:
23  std::shared_ptr<ametsuchi::Storage> storage,
24  std::shared_ptr<ametsuchi::QueryExecutorFactory> qry_exec,
25  std::shared_ptr<iroha::PendingTransactionStorage>
26  pending_transactions,
27  std::shared_ptr<shared_model::interface::QueryResponseFactory>
28  response_factory,
29  logger::Logger log = logger::log("QueryProcessorImpl"));
30 
31  std::unique_ptr<shared_model::interface::QueryResponse> queryHandle(
32  const shared_model::interface::Query &qry) override;
33 
34  rxcpp::observable<
35  std::shared_ptr<shared_model::interface::BlockQueryResponse>>
37  const shared_model::interface::BlocksQuery &qry) override;
38 
39  private:
40  rxcpp::subjects::subject<
41  std::shared_ptr<shared_model::interface::BlockQueryResponse>>
42  blocks_query_subject_;
43  std::shared_ptr<ametsuchi::Storage> storage_;
44  std::shared_ptr<ametsuchi::QueryExecutorFactory> qry_exec_;
45  std::shared_ptr<iroha::PendingTransactionStorage> pending_transactions_;
46  std::shared_ptr<shared_model::interface::QueryResponseFactory>
47  response_factory_;
48 
49  logger::Logger log_;
50  };
51 
52  } // namespace torii
53 } // namespace iroha
54 
55 #endif // IROHA_QUERY_PROCESSOR_IMPL_HPP
Definition: command_client.hpp:16
Definition: query.hpp:34
Definition: query_processor_impl.hpp:20
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:55
std::shared_ptr< spdlog::logger > Logger
Definition: logger.hpp:26
Definition: block_query.hpp:16
Logger log(const std::string &tag)
Definition: logger.cpp:48
std::unique_ptr< shared_model::interface::QueryResponse > queryHandle(const shared_model::interface::Query &qry) override
Definition: query_processor_impl.cpp:42
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::Logger log=logger::log("QueryProcessorImpl"))
Definition: query_processor_impl.cpp:20
Definition: query_processor.hpp:28