MXS-1775 Make MariaDBMon non-dependent on stop() return value

To align it with the behavour or MonitorInstance::stop()
This commit is contained in:
Johan Wikman
2018-05-28 11:43:36 +03:00
parent e8deb553be
commit f862939dd7
4 changed files with 56 additions and 9 deletions

View File

@ -44,6 +44,32 @@ public:
~MariaDBMonitor();
/**
* @brief Current state of the monitor.
*
* Note that in principle the state of the monitor may already have
* changed when the current state is returned. The state can be fully
* trusted only if it is asked in a context when it is know nobody else
* can affect it.
*
* @return @c MXS_MONITOR_RUNNING if the monitor is running,
* @c MXS_MONITOR_STOPPING if the monitor is stopping, and
* @c MXS_MONITOR_STOPPED of the monitor is stopped.
*/
int32_t state() const;
/**
* @brief Find out whether the monitor is running.
*
* @return True, if the monitor is running, false otherwise.
*
* @see state().
*/
bool is_running() const
{
return state() == MXS_MONITOR_RUNNING;
}
/**
* Print diagnostics.
*