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 
34  std::unique_ptr<shared_model::interface::QueryResponse>,
35  std::string>
36  queryHandle(const shared_model::interface::Query &qry) override;
37 
38  rxcpp::observable<
39  std::shared_ptr<shared_model::interface::BlockQueryResponse>>
41  const shared_model::interface::BlocksQuery &qry) override;
42 
43  private:
44  rxcpp::subjects::subject<
45  std::shared_ptr<shared_model::interface::BlockQueryResponse>>
46  blocks_query_subject_;
47  std::shared_ptr<ametsuchi::Storage> storage_;
48  std::shared_ptr<ametsuchi::QueryExecutorFactory> qry_exec_;
49  std::shared_ptr<iroha::PendingTransactionStorage> pending_transactions_;
50  std::shared_ptr<shared_model::interface::QueryResponseFactory>
51  response_factory_;
52 
53  logger::LoggerPtr log_;
54  };
55 
56  } // namespace torii
57 } // namespace iroha
58 
59 #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
Definition: result_fwd.hpp:27
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:15
iroha::expected::Result< std::unique_ptr< shared_model::interface::QueryResponse >, std::string > queryHandle(const shared_model::interface::Query &qry) override
Definition: query_processor_impl.cpp:46
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:22
Definition: query_processor.hpp:31