MXS-1775 Change assumption of Monitor::destroy() function
Used to be assumed to be a static member function, now assumed to be a regular member function.
This commit is contained in:
@ -40,7 +40,7 @@ public:
|
|||||||
|
|
||||||
static void destroyInstance(MXS_MONITOR_INSTANCE* pInstance)
|
static void destroyInstance(MXS_MONITOR_INSTANCE* pInstance)
|
||||||
{
|
{
|
||||||
MXS_EXCEPTION_GUARD(MonitorInstance::destroy(static_cast<MonitorInstance*>(pInstance)));
|
MXS_EXCEPTION_GUARD(static_cast<MonitorInstance*>(pInstance)->destroy());
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool startMonitor(MXS_MONITOR_INSTANCE* pInstance,
|
static bool startMonitor(MXS_MONITOR_INSTANCE* pInstance,
|
||||||
|
@ -36,7 +36,7 @@ struct GRMon : public MXS_MONITOR_INSTANCE
|
|||||||
GRMon& operator&(const GRMon&);
|
GRMon& operator&(const GRMon&);
|
||||||
public:
|
public:
|
||||||
static GRMon* create(MXS_MONITOR* monitor);
|
static GRMon* create(MXS_MONITOR* monitor);
|
||||||
static void destroy(GRMon* monitor);
|
void destroy();
|
||||||
bool start(const MXS_CONFIG_PARAMETER* params);
|
bool start(const MXS_CONFIG_PARAMETER* params);
|
||||||
void stop();
|
void stop();
|
||||||
void diagnostics(DCB* dcb) const;
|
void diagnostics(DCB* dcb) const;
|
||||||
@ -75,6 +75,11 @@ GRMon* GRMon::create(MXS_MONITOR* monitor)
|
|||||||
return new GRMon(monitor);
|
return new GRMon(monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GRMon::destroy()
|
||||||
|
{
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
|
||||||
bool GRMon::start(const MXS_CONFIG_PARAMETER* params)
|
bool GRMon::start(const MXS_CONFIG_PARAMETER* params)
|
||||||
{
|
{
|
||||||
bool started = false;
|
bool started = false;
|
||||||
|
@ -171,9 +171,9 @@ bool MariaDBMonitor::start(const MXS_CONFIG_PARAMETER* params)
|
|||||||
return !error;
|
return !error;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MariaDBMonitor::destroy(MariaDBMonitor* monitor)
|
void MariaDBMonitor::destroy()
|
||||||
{
|
{
|
||||||
delete monitor;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,10 +80,8 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroyes aka deletes the instance.
|
* Destroyes aka deletes the instance.
|
||||||
*
|
|
||||||
* @param monitor The instance to be finished.
|
|
||||||
*/
|
*/
|
||||||
static void destroy(MariaDBMonitor* monitor);
|
void destroy();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop the monitor. Waits until monitor has stopped.
|
* Stop the monitor. Waits until monitor has stopped.
|
||||||
|
Reference in New Issue
Block a user