hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RouterServerProxy.hpp
Go to the documentation of this file.
1 
19 #ifndef __HCE_ROUTERSERVER_PROXY_INCLUDED__
20 #define __HCE_ROUTERSERVER_PROXY_INCLUDED__
21 
22 #include <sstream>
23 #include <map>
24 
25 #include "Handler.hpp"
26 
27 namespace HCE {
28 namespace handlers {
29 
31 public:
32  RouterServerProxy(std::string name, zmq::context_t& ctx,
33  const std::string& clientIdentity, std::string connectionString,
34  int64_t startedAt, unsigned char logPriority, const std::string& iniFile);
35  virtual ~RouterServerProxy();
36 
37 protected:
38  int initialize(void);
39  void deinitialize(void);
40  void* process(void);
41 
42  void handleInternalMessage(void);
43  void handleExternalMessage(void);
44  void handleRouteMessage(void);
45 
46  std::string processAdminCommands(std::string& command, std::string& parameters);
47 
48  void logPeriodicStatistics(void);
49 
51  std::string getPropertyInformation(void);
52 
54  void checkInit(void);
55 
60 
62  std::map<std::string, DefaultReducerResponseItem*> _responses;
63 
65  void setStatRequests(unsigned int statRequests);
66  unsigned int getStatRequests(void);
67 
68  void setStatResponses(unsigned int statResponses);
69  unsigned int getStatResponses(void);
70 
71  void setStatRequestsSize(unsigned int statRequestsSize);
72  unsigned int getStatRequestsSize(void);
73 
74  void setStatResponsesSize(unsigned int statResponsesSize);
75  unsigned int getStatResponsesSize(void);
76 
77  void setStatRequestsProcessed(unsigned int statRequestsProcessed);
78  unsigned int getStatRequestsProcessed(void);
79 
80  void setStatResponsesProcessed(unsigned int statResponsesProcessed);
81  unsigned int getStatResponsesProcessed(void);
82 
83  void setStatRequestsProcessedSize(unsigned int statRequestsProcessedSize);
84  unsigned int getStatRequestsProcessedSize(void);
85 
86  void setStatResponsesProcessedSize(unsigned int statResponsesProcessedSize);
87  unsigned int getStatResponsesProcessedSize(void);
88 
89  void setStatQPS(float statQPS);
90  float getStatQPS(void);
91 
92  void setStatRPS(float statRPS);
93  float getStatRPS(void);
94 
95  void setStatRequestsBandwidth(float statRequestsBandwidth);
96  float getStatRequestsBandwidth(void);
97 
98  void setStatResponsesBandwidth(float statResponsesBandwidth);
99  float getStatResponsesBandwidth(void);
100 
102  void setPstatsAt(int64_t pstatsAt);
103  int64_t getPstatsAt(void);
104 };
105 
106 }
107 }
108 
109 #endif /* __HCE_ROUTERSERVER_PROXY_INCLUDED__ */