hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DataClientData.hpp
Go to the documentation of this file.
1 
16 #ifndef __HCE_DATA_CLIENT_DATA_INCLUDED__
17 #define __HCE_DATA_CLIENT_DATA_INCLUDED__
18 
19 #include <iostream>
20 #include <sstream>
21 
22 #include "Handler.hpp"
23 #include "DataNodeOptions.hpp"
24 
25 //Node ini
26 #include <Poco/Util/IniFileConfiguration.h>
27 #include "Poco/String.h"
28 
29 namespace HCE {
30  namespace handlers {
31 
33  public:
34  DataClientData(std::string name, zmq::context_t& ctx,
35  const std::string& clientIdentity, std::string connectionString,
36  unsigned char dataClientMode, int64_t startedAt,
37  unsigned char logPriority, const std::string& iniFile="");
39 
40  protected:
41  int initialize(void);
42  void deinitialize(void);
43  void* process(void);
44 
45  void rebuildDataClientSocket(void);
46  void handleExternalMessage(void);
47  void handleInternalMessage(void);
48  void heartbit(void);
49  void sendHeartbeat(void);
50  void logPeriodicStatistics(void);
51  void externalConnectionRefresh(void);
52  std::string processAdminCommands(std::string& command, std::string& parameters);
53 
55  std::string getResourceUsageMessage(void) const;
56 
58  std::string getPropertyInformation(void);
59 
61  void checkInit(void);
62 
67 
70 
72  void setDataClientSockMode(unsigned char dataClientSockMode);
73  unsigned char getDataClientSockMode(void);
74 
76  void setStatRequests(unsigned int statRequests);
77  unsigned int getStatRequests(void);
78 
79  void setStatResponses(unsigned int statResponses);
80  unsigned int getStatResponses(void);
81 
82  void setStatRequestsSize(unsigned int statRequestsSize);
83  unsigned int getStatRequestsSize(void);
84 
85  void setStatResponsesSize(unsigned int statResponsesSize);
86  unsigned int getStatResponsesSize(void);
87 
88  void setStatRequestsProcessed(unsigned int statRequestsProcessed);
89  unsigned int getStatRequestsProcessed(void);
90 
91  void setStatResponsesProcessed(unsigned int statResponsesProcessed);
92  unsigned int getStatResponsesProcessed(void);
93 
94  void setStatRequestsProcessedSize(unsigned int statRequestsProcessedSize);
95  unsigned int getStatRequestsProcessedSize(void);
96 
97  void setStatResponsesProcessedSize(unsigned int statResponsesProcessedSize);
98  unsigned int getStatResponsesProcessedSize(void);
99 
100  void setStatQPS(float statQPS);
101  float getStatQPS(void);
102 
103  void setStatRPS(float statRPS);
104  float getStatRPS(void);
105 
106  void setStatRequestsBandwidth(float statRequestsBandwidth);
107  float getStatRequestsBandwidth(void);
108 
109  void setStatResponsesBandwidth(float statResponsesBandwidth);
110  float getStatResponsesBandwidth(void);
111 
113  void setPstatsAt(int64_t pstatsAt);
114  int64_t getPstatsAt(void);
115 
117  void setHeartbeatAt(int64_t heartbeatAt);
118  int64_t getHeartbeatAt(void);
119 
121  void setHeartbeatedAt(int64_t heartbeatedAt);
122  int64_t getHeartbeatedAt(void);
123  };
124  }
125 }
126 
127 #endif /* __HCE_DATA_CLIENT_DATA_INCLUDED__ */