hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SphinxTaskReducersManager.hpp
Go to the documentation of this file.
1 
14 #ifndef SPHINXTASKREDUCERSMANAGER_HPP_
15 #define SPHINXTASKREDUCERSMANAGER_HPP_
16 
22 #include "SphinxResultSorterIf.hpp"
23 #include "Exceptions.hpp"
24 
25 namespace HCE {
26 namespace sphinx {
27 namespace reduce_task {
28 
30 public:
32  const Poco::SharedPtr<SphinxTaskReducersStorageIf>& sphinxTaskReducersStorage,
33  const Poco::SharedPtr<SphinxTaskReducerFactoryIf>& sphinxTaskReducerFactory,
34  const Poco::SharedPtr<SphinxResultJSONConvertorIf>& sphinxResultJSONConvertor);
36 
38  bool isReducerExist(unsigned long long reduceTaskId);
39  void createReducer(unsigned long long reduceTaskId);
40  void addDataInReducer(unsigned long long reduceTaskId, const std::string& json);
41  std::string runReduceTaskForTaskId(unsigned long long reduceTaskId);
42  void deleteReducerBy(unsigned long long reduceTaskId);
43 
44 private:
45  Poco::SharedPtr<SphinxTaskReducersStorageIf>_sphinxTaskReducersStorage;
46  Poco::SharedPtr<SphinxTaskReducerFactoryIf>_sphinxTaskReducerFactory;
47  Poco::SharedPtr<SphinxResultJSONConvertorIf>_sphinxResultJSONConvertor;
48 
49  Poco::SharedPtr<SphinxResultData> transformSphinxResultData(
50  Poco::SharedPtr<SphinxResultData>& reduceResult);
51 };
52 
53 }
54 }
55 }
56 
57 #endif