MXS-1848 Change prototype of startMonitor
StartMonitor() now takes a MXS_MONITOR_INSTANCE and returns true, if the monitor could be started and false otherwise. So, the setup is such that in createInstance(), the instance data is created and then using startMonitor() and stopMonitor() the monitor is started/stopped. Finally in destroyInstance(), the actual instance data is deleted.
This commit is contained in:
@ -71,14 +71,13 @@ public:
|
||||
static MariaDBMonitor* create(MXS_MONITOR *monitor);
|
||||
|
||||
/**
|
||||
* Start the monitor instance and return the instance data, creating it if starting for the first time.
|
||||
* Start the monitor instance.
|
||||
* This function creates a thread to execute the monitoring.
|
||||
*
|
||||
* @param monitor General monitor data
|
||||
* @param params Configuration parameters
|
||||
* @return A pointer to MariaDBMonitor specific data.
|
||||
* @return True, if the monitor could be started, false otherwise.
|
||||
*/
|
||||
static MariaDBMonitor* create_and_start(MXS_MONITOR *monitor, const MXS_CONFIG_PARAMETER* params);
|
||||
bool start(const MXS_CONFIG_PARAMETER* params);
|
||||
|
||||
/**
|
||||
* Destroyes aka deletes the instance.
|
||||
|
Reference in New Issue
Block a user