MXS-1775 Introduce maxscale::MonitorInstance
- All monitors (but MariaDBMon for the time being) inherit from that. - All common member variables moved to that class. Still manipulated in derived classes. In subsequent commits common functionality will be moved to that class.
This commit is contained in:
@ -26,19 +26,12 @@
|
||||
|
||||
|
||||
AuroraMonitor::AuroraMonitor(MXS_MONITOR* monitor)
|
||||
: m_shutdown(false)
|
||||
, m_thread(0)
|
||||
, m_script(NULL)
|
||||
, m_events(0)
|
||||
, m_monitor(monitor)
|
||||
, m_checked(false)
|
||||
: maxscale::MonitorInstance(monitor)
|
||||
{
|
||||
}
|
||||
|
||||
AuroraMonitor::~AuroraMonitor()
|
||||
{
|
||||
ss_dassert(!m_thread);
|
||||
ss_dassert(!m_script);
|
||||
}
|
||||
|
||||
//static
|
||||
|
@ -20,7 +20,7 @@
|
||||
* @file auroramon.hh - The Aurora monitor
|
||||
*/
|
||||
|
||||
class AuroraMonitor : public MXS_MONITOR_INSTANCE
|
||||
class AuroraMonitor : public maxscale::MonitorInstance
|
||||
{
|
||||
public:
|
||||
AuroraMonitor(const AuroraMonitor&) = delete;
|
||||
@ -34,13 +34,6 @@ public:
|
||||
json_t* diagnostics_json() const;
|
||||
|
||||
private:
|
||||
bool m_shutdown; /**< True if the monitor is stopped */
|
||||
THREAD m_thread; /**< Monitor thread */
|
||||
char* m_script; /**< Launchable script */
|
||||
uint64_t m_events; /**< Enabled monitor events */
|
||||
MXS_MONITOR* m_monitor; /**< Pointer to generic monitor structure */
|
||||
bool m_checked; /**< Whether server access has been checked */
|
||||
|
||||
AuroraMonitor(MXS_MONITOR* monitor);
|
||||
~AuroraMonitor();
|
||||
|
||||
|
Reference in New Issue
Block a user