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


Public Member Functions | |
| Admin (std::string name, zmq::context_t &ctx, const std::string &clientIdentity, std::string connectionString, int64_t startedAt, unsigned char logPriority, const std::string &iniFile="") | |
| ~Admin () | |
| void | stopClients (void) |
Public Member Functions inherited from HCE::handlers::Handler | |
| 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) |
Protected Member Functions | |
| int | initialize (void) |
| void | deinitialize (void) |
| void * | process (void) |
| void | handleInternalMessage (void) |
| void | handleExternalMessage (void) |
| void | processDataMessage (zmsg &msg) |
| void | processControlMessageInproc (zmsg &msg) |
| void | processDataMessageInproc (zmsg &msg) |
| void | registerClientInproc (const std::string &identity) |
| unsigned char | processAdminRequest (zmsg &msg) |
| std::string | processAdminCommands (std::string &command, std::string ¶meters) |
| Get property information. | |
| std::string | getPropertyInformation (void) |
| Set stat request total. | |
| void | setStatRequestsTotal (unsigned int statRequestsTotal) |
| Get stat request total. | |
| unsigned int | getStatRequestsTotal (void) |
| Sockets. | |
Protected Member Functions inherited from HCE::handlers::Handler | |
| 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) |
| 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. | |
| 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) |
| void | processControlMessage (zmsg &msg) |
| void | logPeriodicStatistics (void) |
| void | heartbit (void) |
| void | registerClient (const std::string &identity) |
| Admin socket. | |
Static Protected Member Functions | |
| static std::vector< std::string > | parseAdminRequest (const std::string &command) |
Protected Attributes | |
| zmq::socket_t * | _adminServerSock |
| Queue of connected clients for inproc_admin. | |
| std::vector< ClientWorkerItem > | _queueInproc |
| Connected clients queue manager. | |
| ClientsQueueManager * | _clientsManagerInproc |
Protected Attributes inherited from HCE::handlers::Handler | |
| 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 |
Additional Inherited Members | |
Static Public Member Functions inherited from HCE::handlers::Handler | |
| static void * | main (void *that) |
| HCE::handlers::Admin::Admin | ( | std::string | name, |
| zmq::context_t & | ctx, | ||
| const std::string & | clientIdentity, | ||
| std::string | connectionString, | ||
| int64_t | startedAt, | ||
| unsigned char | logPriority, | ||
| const std::string & | iniFile = "" |
||
| ) |
| HCE::handlers::Admin::~Admin | ( | ) |
|
protectedvirtual |
Implements HCE::handlers::Handler.
Definition at line 45 of file Admin.cpp.


|
protectedvirtual |
Set stat request total.
Reimplemented from HCE::handlers::Handler.
Definition at line 356 of file Admin.cpp.


|
protected |
|
protected |
<Fetch message from dataserver
<Process dataserver's message
<Data message
Reimplemented from HCE::handlers::Handler.
Definition at line 418 of file Admin.cpp.


|
protected |
<Fetch message from dataserver
<Process dataserver's message
<Control message
<Data message
Reimplemented from HCE::handlers::Handler.
Definition at line 69 of file Admin.cpp.


|
protectedvirtual |
<Rebuild inproc_proxy connection
<Rebuild adminserver connection
<Init stat vars
Implements HCE::handlers::Handler.
Definition at line 23 of file Admin.cpp.


|
staticprotected |
|
protectedvirtual |
<Enter main loop of processing of message
<Init polling pool
<Poll dataserver
<Handle adminserver socket's message
Implements HCE::handlers::Handler.
Definition at line 434 of file Admin.cpp.

|
protectedvirtual |
Get property information.
<Process commands
<Get timeout of shutdown action (ms), 0 - default
<Wait timeout
<Stop admin handler main loop
<Make property information
<Parse command parameters and fetch log level value
<Make response
<Set new log priority
<Parse command parameters and fetch poll timeout value
<Parse poll timeout from parameters
<Make response
<Parse command parameters and fetch dump interval value
<Parse dump interval from parameters
<Make response
<Set new dump interval value
Reimplemented from HCE::handlers::Handler.
Definition at line 274 of file Admin.cpp.


|
protected |
<Fetch the clientIdentity field
<Fetch message Id
<Fetch message body
<Parse message body, supposes minimum 3 items: 0 - DESTINATION HANDLER IDENTITY, 1 - COMMAND_NAME, 2 - PARAMETERS
<Parse command parameters
<External admin command for inproc handler Insert inproc destination identity
<Insert source message Id
<Insert command name
<Insert command parameters
<Insert source client identity
<Response message value
<Insert source client identity
<Insert source message Id
<Insert response message
<Response message value
<Wrong or not supported command
<Insert source message Id
<Insert response message
<Wrong or not supported command
<Insert source client identity
<Insert source message Id
<Insert response message
<Wrong incoming command message body format from manager or destination admin handler (class instance by name) not connected Insert source client identity
<Insert source message Id
<Insert error message
<Register total requests number
Definition at line 133 of file Admin.cpp.


|
protected |
|
protected |
<Send admin request message to inproc client to handle admin message by destination handler
<Send okay response message, command was executed internally
<Send error response message - wrong format of requested command or another parse error, send error response message to manager
Reimplemented from HCE::handlers::Handler.
Definition at line 365 of file Admin.cpp.


|
protected |
<Fetch the clientIdentity field
<Fetch message Id
<Fetch message body
<Fetch the source clientIdentity field
<Create new response message
<Insert client identity
<Insert source message Id
<Insert message body
<Send response to manager
Definition at line 386 of file Admin.cpp.


|
protected |
|
protected |
| void HCE::handlers::Admin::stopClients | ( | void | ) |
|
protected |
|
protected |
|
protected |