hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCEResourceLimitsChecker.hpp
Go to the documentation of this file.
1 
14 #ifndef DRCE_RESOURCE_LIMITS_CHECKER_HPP
15 #define DRCE_RESOURCE_LIMITS_CHECKER_HPP
16 
17 #include <iostream>
18 #include <utility>
19 #include <Poco/Exception.h>
20 
21 #include "DRCEResourceLimits.hpp"
22 #include "CustomMessage.hpp"
23 
24 namespace HCE
25 {
26 namespace drce
27 {
28 class AsyncTasks;
29 //-----------------------------------------------------------------------------
31 {
32 public:
35 
36  void checkLimits(const ResourceLimits& resourceLimit) throw (Poco::Exception);
37  void checkLimits(const AsyncTasks& asyncTask, const ResourceUsageLimits& resourceUsageLimit) throw (Poco::Exception);
38 private:
39  static void getUsingProcessAndThreads(unsigned int& processCount, unsigned int& threadsCount);
40 
41 private:
42  CustomMessage& message;
43 };
44 //-----------------------------------------------------------------------------
45 //-----------------------------------------------------------------------------
46 } // end namespace drce
47 } // end namespace HCE
48 
49 #endif // DRCE_RESOURCE_LIMITS_CHECKER_HPP