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:
@ -14,7 +14,7 @@
|
||||
/**
|
||||
* @file monitor.c - The monitor module management routines
|
||||
*/
|
||||
#include <maxscale/monitor.h>
|
||||
#include <maxscale/monitor.hh>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
@ -2502,3 +2502,24 @@ int mon_config_get_servers(const MXS_CONFIG_PARAMETER* params, const char* key,
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
namespace maxscale
|
||||
{
|
||||
|
||||
MonitorInstance::MonitorInstance(MXS_MONITOR* pMonitor)
|
||||
: m_status(0)
|
||||
, m_thread(0)
|
||||
, m_monitor(pMonitor)
|
||||
, m_shutdown(0)
|
||||
, m_script(NULL)
|
||||
, m_events(0)
|
||||
{
|
||||
}
|
||||
|
||||
MonitorInstance::~MonitorInstance()
|
||||
{
|
||||
ss_dassert(!m_thread);
|
||||
ss_dassert(!m_script);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user