HCE project C++ developers source code library  1.1.1
HCE project developer library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ReduceTaskCore.hpp
Go to the documentation of this file.
1 
15 #ifndef REDUCE_TASK_CORE_H
16 #define REDUCE_TASK_CORE_H
17 
18 #include <Poco/SharedPtr.h>
19 #include <string>
20 
21 namespace HCE{
22 namespace reduce{
23 namespace core{
24 
29 class IterableIf{
30 public:
31  virtual ~IterableIf(){}
32  virtual bool hasNext() = 0;
33  virtual void reset() = 0;
34  virtual void getNext(std::string &key, std::string &value) = 0;
35 };
36 
37 
42 class StorableIf{
43 public:
44  virtual ~StorableIf(){}
45  virtual void addKeyValue(const std::string &key, const std::string &value) = 0;
46 };
47 
48 
54 class ReduceResultIf: public virtual IterableIf, public virtual StorableIf{
55 public:
56  virtual ~ReduceResultIf(){}
57 };
58 
59 
64 class ReduceTaskIf: public virtual StorableIf{
65 public:
66  virtual ~ReduceTaskIf(){}
67  virtual void fillReduceResult(Poco::SharedPtr<ReduceResultIf> reduceResult) = 0;
68 };
69 
70 
76 public:
77  virtual ~ReduceJobIf(){}
78  virtual Poco::SharedPtr<IterableIf> getDataStorage() const = 0;
79  virtual Poco::SharedPtr<ReduceResultIf> getReduceResult() const = 0;
80  virtual Poco::SharedPtr<ReduceTaskIf> getReduceTask() const = 0;
81 };
82 
83 
89 {
90 public:
91  virtual ~ScheduleStrategyIf(){}
92  virtual void executeJob(const Poco::SharedPtr<ReduceJobIf> &reduceJob) = 0;
93 };
94 
95 }
96 }
97 }
98 
99 #endif