hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ReducingPartsCountersStorage.hpp
Go to the documentation of this file.
1 
15 #ifndef REDUCINGPARTSCOUNTERSSTORAGE_HPP_
16 #define REDUCINGPARTSCOUNTERSSTORAGE_HPP_
17 
19 #include <map>
20 
21 namespace HCE
22 {
23 namespace reduce
24 {
25 
27 public:
28  typedef std::map<unsigned long long, int>::iterator StorageIterator;
29 
32 
33  bool findBy(unsigned long long keyId);
34  void deleteBy(unsigned long long keyId);
35  void addReducingPartsCounterWithKey(unsigned long long keyId);
36  void incrementBy(unsigned long long keyId);
37  int getAccumulateReducingParts(unsigned long long keyId);
38  unsigned int getTotalTasksNumber();
39 
40 private:
41  std::map<unsigned long long, int> keyIdCountersStorage;
42 
43  StorageIterator findIteratorBy(unsigned long long keyId);
44 };
45 
46 }
47 }
48 
49 #endif