|
hce-node application
1.4.3
HCE Hierarchical Cluster Engine node application
|
#include <Handler.hpp>


Public Member Functions | |
| Handler (const std::string &name, zmq::context_t &context, const std::string &clientIdentity, const std::string &connectionString, int64_t startedAt, unsigned char logPriority, const std::string &iniFile="") | |
| virtual | ~Handler () |
| void | shutdown (void) |
| Get handler instance name. | |
| std::string | getName (void) |
Static Public Member Functions | |
| static void * | main (void *that) |
Protected Member Functions | |
| void | setName (const std::string &name) |
| <Set handler instance name | |
| void | setClientIdentity (const std::string &clientIdentity) |
| Get client ID. | |
| std::string | getClientIdentity (void) |
| Set start time mark. | |
| void | setStartedAt (int64_t startedAt) |
| Get start time mark. | |
| int64_t | getStartedAt (void) |
| Set log priority level. | |
| void | setLogPriority (unsigned int logPriority) |
| Get log priority level. | |
| unsigned int | getLogPriority (void) |
| Set ini file name. | |
| void | setIniFile (const std::string &iniFile) |
| Get ini file name. | |
| std::string | getIniFile (void) |
| Set ZMQ connections rebuild tries max number. | |
| void | setBindTriesMaxNumber (const unsigned int &bindTriesMaxNumber) |
| Get ZMQ connections rebuild tries max number. | |
| unsigned int | getBindTriesMaxNumber (void) |
| Set ZMQ connections rebuild tries delay. | |
| void | setBindTriesDelay (const unsigned int &bindTriesDelay) |
| Get ZMQ connections rebuild tries delay. | |
| unsigned int | getBindTriesDelay (void) |
| Set ZMQ connection string. | |
| void | setConnectionString (const std::string &connectionString) |
| Get ZMQ connection string. | |
| std::string | getConnectionString (void) |
| Set flag for polling condition. | |
| void | setInProgress (bool in_progress) |
| Get flag for polling condition. | |
| bool | getInProgress (void) const |
| Set poll timeout value. | |
| void | setPollTimeout (unsigned int pollTimeout) |
| Get poll timeout value. | |
| unsigned int | getPollTimeout (void) |
| Set property interval between resend Property values. | |
| void | setPropertyInterval (unsigned int propertyInterval) |
| Get property interval between resend Property values. | |
| unsigned int | getPropertyInterval (void) |
| Set interval between dump run-time variables. | |
| void | setDumpInterval (unsigned int dumpInterval) |
| Get interval between dump run-time variables. | |
| unsigned int | getDumpInterval (void) |
| Set flag for allowed restore variables use dump. | |
| void | setDumpAllowRestore (unsigned int dumpAllowRestore) |
| Get interval between dump run-time variables. | |
| unsigned int | getDumpAllowRestore (void) |
| void | logFlush (unsigned int priority=NODE_LOG_MODE_DEFAULT) |
| Node init from file. | |
| void | initHandler (const std::string &iniFile, LoggerStream &logger) |
| void | handleAdminMessage (void) |
| void | processAdminMessage (zmsg &msg) |
| virtual std::string | processAdminCommands (std::string &command, std::string ¶meters) |
| void | rebuildAdminClientSocket (void) |
| bool | rebuildServerConnection (zmq::socket_t *&sock_p, const std::string &connectionString, const int type) |
| void | rebuildClientConnection (zmq::socket_t *&sock_p, const std::string &connectionString, const int type, const std::string &identity="") |
| bool | rebuildClientConnection (zmq::socket_t *&sock_p, const std::string &connectionString, const int type, const std::string &identity, int linger, const std::string &readyMessage="", const std::string &byeMessage=NODE_MSG_BYE) |
| void | sendByeMessage (zmq::socket_t *&sock_p, const std::string &identity="", const std::string &byeMessage=NODE_MSG_BYE) |
| std::string | getProperties (void) |
| Get property information. | |
| virtual std::string | getPropertyInformation (void) |
| Send periodical property values. | |
| void | sendPeriodicProperties (void) |
| Safe create directories if necessary. | |
| void | createDirectories (const std::string &name) |
| Get file name use for dump and restore properties values. | |
| std::string | getDumpFileName (void) |
| Get file name use for dump and restore statistic values. | |
| std::string | getStatFileName (void) |
| Dump properties variables. | |
| bool | dumpProperties (void) |
| Dump run-time variables at regular intervals. | |
| bool | dumpRunTimeVariables (void) |
| virtual int | initialize (void)=0 |
| virtual void | deinitialize (void)=0 |
| virtual void * | process (void)=0 |
| void | handleInternalMessage (void) |
| void | handleExternalMessage (void) |
| void | processControlMessage (zmsg &msg) |
| void | processDataMessage (zmsg &msg) |
| void | logPeriodicStatistics (void) |
| void | heartbit (void) |
| void | registerClient (const std::string &identity) |
| Admin socket. | |
Protected Attributes | |
| zmq::socket_t * | _inprocAdminSock |
| Storage for run-time property variables. | |
| HandlerProperties | handlerProperties |
| Storage for run-time statistic variables. | |
| HandlerProperties | statProperties |
| ZMQ context. | |
| zmq::context_t & | _context |
| std::bitset< 4 > | _logMask |
| std::string | _logTimeFormat |
| std::stringstream | log |
| LoggerStream | logger |
| Main loop of sockets polling condition. | |
| bool | _inProgress |
| Send out periodical property values to Admin class at regular intervals. | |
| int64_t | _propertyIntervalAt |
| Dump run-time variables at regular intervals. | |
| int64_t | _dumpIntervalAt |
| Dump dir name. | |
| std::string | _dumpDir |
Definition at line 43 of file Handler.hpp.
|
inline |
<Set default value to allowed dump restore
<Read initialization data from file
<Check is allowed dump restore and restore if necessary
<Load handler properties values
Definition at line 45 of file Handler.hpp.

|
inlinevirtual |
<Save handler properties values
Definition at line 82 of file Handler.hpp.

|
inlineprotected |
Get file name use for dump and restore properties values.
Definition at line 609 of file Handler.hpp.


|
protectedpure virtual |
|
inlineprotected |
Dump run-time variables at regular intervals.
<Save handler properties values
Definition at line 637 of file Handler.hpp.


|
inlineprotected |
Definition at line 650 of file Handler.hpp.


|
inlineprotected |
Set ZMQ connection string.
Definition at line 178 of file Handler.hpp.


|
inlineprotected |
Set ZMQ connections rebuild tries delay.
Definition at line 168 of file Handler.hpp.


|
inlineprotected |
Set start time mark.
Definition at line 128 of file Handler.hpp.


|
inlineprotected |
Set flag for polling condition.
Definition at line 188 of file Handler.hpp.


|
inlineprotected |
Definition at line 245 of file Handler.hpp.


|
inlineprotected |
Get file name use for dump and restore statistic values.
Definition at line 621 of file Handler.hpp.


|
inlineprotected |
Set flag for allowed restore variables use dump.
Definition at line 235 of file Handler.hpp.


|
inlineprotected |
Set ZMQ connections rebuild tries max number.
Definition at line 158 of file Handler.hpp.


|
inlineprotected |
Set poll timeout value.
Definition at line 198 of file Handler.hpp.

|
inlineprotected |
Set ini file name.
Definition at line 148 of file Handler.hpp.


|
inline |
Definition at line 111 of file Handler.hpp.


|
inlineprotected |
Set property interval between resend Property values.
Definition at line 210 of file Handler.hpp.


|
inlineprotected |
Get property information.
Definition at line 574 of file Handler.hpp.


|
inlineprotectedvirtual |
Send periodical property values.
Reimplemented in HCE::handlers::DataProcessorData, HCE::handlers::DataReducerProxy, HCE::handlers::DataServerProxy, HCE::handlers::DataClientData, HCE::handlers::Admin, HCE::handlers::DataClientProxy, and HCE::handlers::RouterServerProxy.
Definition at line 583 of file Handler.hpp.

|
inlineprotected |
Set interval between dump run-time variables.
Definition at line 222 of file Handler.hpp.


|
inlineprotected |
Set log priority level.
Definition at line 138 of file Handler.hpp.


|
inlineprotected |
Dump properties variables.
Definition at line 629 of file Handler.hpp.


|
inlineprotected |
<Fetch request message from inproc_admin socket
<Process message
<Send response message
Definition at line 328 of file Handler.hpp.


|
protected |
|
protected |
|
protected |
Reimplemented in HCE::handlers::DataServerProxy, HCE::handlers::DataClientData, and HCE::handlers::DataClientProxy.
|
inlineprotected |
<Process Node's ini file
<Log some error of config file processing
<Log some error of config file processing
Definition at line 280 of file Handler.hpp.


|
protectedpure virtual |
|
inlineprotected |
Node init from file.
Definition at line 249 of file Handler.hpp.

|
protected |
Reimplemented in HCE::handlers::DataServerProxy, HCE::handlers::DataClientData, and HCE::handlers::RouterServerProxy.
|
inlinestatic |
|
protectedpure virtual |
|
inlineprotectedvirtual |
Reimplemented in HCE::handlers::DataProcessorData, HCE::handlers::DataReducerProxy, HCE::handlers::DataClientData, HCE::handlers::Admin, HCE::handlers::DataServerProxy, HCE::handlers::RouterServerProxy, and HCE::handlers::DataClientProxy.
Definition at line 418 of file Handler.hpp.

|
inlineprotected |
<Fetch message Id
<Fetch message command
<Fetch message command parameters
<Fetch message source Identity
<Create response
<Parse command parameters and fetch log level value
<Parse command parameters and fetch log level value
<Parse command parameters and fetch property interval value
<Parse command parameters and fetch dump interval value
<Stop handler main loop as a result of processing of the "Shutdown" command for "Admin" handler
<Call admin commands processing redefined in the derivative class instance
<Insert response
<Insert messageSrcIdentity
Definition at line 341 of file Handler.hpp.


|
protected |
Reimplemented in HCE::handlers::DataServerProxy, and HCE::handlers::DataClientProxy.
|
protected |
Reimplemented in HCE::handlers::DataServerProxy, HCE::handlers::Admin, and HCE::handlers::DataClientProxy.
|
inlineprotected |
<Set identity for client socket
<Connect to inproc_admin socket
<Send ready message
Definition at line 424 of file Handler.hpp.


|
inlineprotected |
|
inlineprotected |
<Delete socket if already exists
<Send BYE message to the server (especially for the Paranoid Pirate Protocol implementations)
<Set identity to route responses from router
<Set linger for the socket (0 - to not wait at close time)
<Send READY message to the server (especially for the Paranoid Pirate Protocol implementations)
Definition at line 501 of file Handler.hpp.

|
inlineprotected |
<Delete socket if already exists
<Try to bind
Definition at line 451 of file Handler.hpp.


|
protected |
Admin socket.
Reimplemented in HCE::handlers::DataServerProxy.
|
inlineprotected |
<Send BYE message to the server (especially for the Paranoid Pirate Protocol implementations)
Definition at line 568 of file Handler.hpp.


|
inlineprotected |
Safe create directories if necessary.
<Log periodic properties sending
Definition at line 589 of file Handler.hpp.


|
inlineprotected |
Get ZMQ connections rebuild tries delay.
Definition at line 173 of file Handler.hpp.


|
inlineprotected |
Get ZMQ connections rebuild tries max number.
Definition at line 163 of file Handler.hpp.


|
inlineprotected |
Get client ID.
Definition at line 123 of file Handler.hpp.


|
inlineprotected |
Get ZMQ connection string.
Definition at line 183 of file Handler.hpp.


|
inlineprotected |
Get interval between dump run-time variables.
Definition at line 240 of file Handler.hpp.


|
inlineprotected |
Get interval between dump run-time variables.
Definition at line 227 of file Handler.hpp.


|
inlineprotected |
Get ini file name.
Definition at line 153 of file Handler.hpp.


|
inlineprotected |
Get flag for polling condition.
Definition at line 193 of file Handler.hpp.

|
inlineprotected |
Get log priority level.
Definition at line 143 of file Handler.hpp.


|
inlineprotected |
<Set handler instance name
Set client ID
Definition at line 118 of file Handler.hpp.


|
inlineprotected |
Get poll timeout value.
Definition at line 203 of file Handler.hpp.


|
inlineprotected |
Get property interval between resend Property values.
Definition at line 215 of file Handler.hpp.


|
inlineprotected |
Get start time mark.
Definition at line 133 of file Handler.hpp.


|
inline |
Get handler instance name.
Definition at line 106 of file Handler.hpp.

|
protected |
Definition at line 683 of file Handler.hpp.
|
protected |
Definition at line 705 of file Handler.hpp.
|
protected |
Dump dir name.
Definition at line 704 of file Handler.hpp.
|
protected |
Storage for run-time property variables.
Definition at line 676 of file Handler.hpp.
|
protected |
Send out periodical property values to Admin class at regular intervals.
Definition at line 698 of file Handler.hpp.
|
protected |
Definition at line 686 of file Handler.hpp.
|
protected |
Definition at line 688 of file Handler.hpp.
|
protected |
Dump run-time variables at regular intervals.
Definition at line 701 of file Handler.hpp.
|
protected |
Storage for run-time statistic variables.
Definition at line 679 of file Handler.hpp.
|
protected |
Definition at line 690 of file Handler.hpp.
|
protected |
Main loop of sockets polling condition.
Definition at line 695 of file Handler.hpp.
|
protected |
ZMQ context.
Definition at line 682 of file Handler.hpp.