hce-node application
1.4.3
HCE Hierarchical Cluster Engine node application
Main Page
Namespaces
Classes
Files
File List
File Members
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
17
#include "
CalculatorNodeExecution.hpp
"
18
19
namespace
HCE
20
{
21
namespace
handlers
22
{
23
//-----------------------------------------------------------------------------
24
typedef
Dictionary <std::string, double>
ResourceUsageLimitsData
;
25
//-----------------------------------------------------------------------------
26
class
ResourceUsageLimitsChecker
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
:
39
ResourceUsageLimitsChecker
(
ResourceUsageLimitsData
& limitsData_);
40
~ResourceUsageLimitsChecker
(
void
) {}
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
sources
src
ResourceUsageLimitsChecker.hpp
Generated on Tue Jun 30 2015 19:42:09 for hce-node application by
1.8.1.2