MXS-2271 All monitors inherit from MXS_MONITOR

Most of the API entrypoints are replaced with virtual functions.
This commit is contained in:
Esa Korhonen
2019-01-18 17:27:41 +02:00
parent 17fc2ba88a
commit dadb6a1a79
19 changed files with 94 additions and 118 deletions

View File

@ -22,8 +22,7 @@
#include <maxscale/mysql_utils.hh>
NDBCMonitor::NDBCMonitor(MXS_MONITOR* monitor)
: maxscale::MonitorInstanceSimple(monitor)
NDBCMonitor::NDBCMonitor()
{
}
@ -32,9 +31,9 @@ NDBCMonitor::~NDBCMonitor()
}
// static
NDBCMonitor* NDBCMonitor::create(MXS_MONITOR* monitor)
NDBCMonitor* NDBCMonitor::create()
{
return new NDBCMonitor(monitor);
return new NDBCMonitor();
}
bool NDBCMonitor::has_sufficient_permissions() const

View File

@ -26,12 +26,12 @@ public:
NDBCMonitor& operator=(const NDBCMonitor&) = delete;
~NDBCMonitor();
static NDBCMonitor* create(MXS_MONITOR* monitor);
static NDBCMonitor* create();
protected:
bool has_sufficient_permissions() const;
void update_server_status(MXS_MONITORED_SERVER* monitored_server);
private:
NDBCMonitor(MXS_MONITOR* monitor);
NDBCMonitor();
};