hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ResourceUsageLimitsChecker.hpp
Go to the documentation of this file.
1 
14 #ifndef RESOURCE_USAGE_LIMITS_CHECKER_HPP
15 #define RESOURCE_USAGE_LIMITS_CHECKER_HPP
16 
18 
19 namespace HCE
20 {
21 namespace handlers
22 {
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
27 {
28  std::map<std::string, std::string> resourcesUsageMessage={
29  {"1", "CPU usage"},
30  {"2", "iowait load"},
31  {"3", "virtual RAM"},
32  {"4", "resource RAM"},
33  {"5", "hard disk"},
34  {"6", "processes"},
35  {"7", "threads"},
36  {"8", "load average"}
37  };
38 public:
41 
42  void executeCheck(const CalculatorNodeResourceData& resourceData) throw (Poco::Exception);
43  bool safeCheck(const CalculatorNodeResourceData& resourceData, std::string& errorMsg);
44 private:
45  ResourceUsageLimitsData& limitsData;
46 };
47 //-----------------------------------------------------------------------------
48 //-----------------------------------------------------------------------------
49 } // end namespace handlers
50 } // end namespace HCE
51 
52 #endif // RESOURCE_USAGE_LIMITS_CHECKER_HPP