MXS-1775 Check connection in MonitorInstance::tick()

Since the connection checking is done in an identical fashion in
all monitors, it can be moved to the base-class.
This commit is contained in:
Johan Wikman
2018-05-24 16:13:00 +03:00
parent a8205824f8
commit 15b1c270a3
7 changed files with 34 additions and 142 deletions

View File

@ -72,8 +72,13 @@ protected:
* on each server.
*
* The default implementation will:
* - Not call @update_server_status for a server that is in maintenance.
* - Not call @c update_server_status for a server that is in maintenance.
* - Before calling, update the previous status of the server.
* - Before calling, update the pending status of the monitored server object
* to the status of the corresponing server object.
* - Ensure that there is a connection to the server. If that fails, then
* the pending status will be updated accordingly and @c update_server_status
* will *not* be called.
* - After the call, update the error count of the server.
*/
virtual void tick();