MXS-2271 Monitor modifications always go through Monitor::configure()
Previously, runtime monitor modifications could directly alter monitor fields, which could leave the text-form parameters and reality out-of-sync. Also, the configure-function was not called for the entire monitor-object, only the module-implementation. Now, all modifications go through the overridden configure-function, which calls the base-class function. As most configuration changes are given in text-form, this removes the need for specific setters. The only exceptions are the server add/remove operations, which must modify the text-form serverlist.
This commit is contained in:
@ -106,27 +106,32 @@ public:
|
||||
*/
|
||||
static void destroy_all_monitors();
|
||||
|
||||
static void monitor_start(Monitor*, const MXS_CONFIG_PARAMETER*);
|
||||
static void monitor_start(Monitor*);
|
||||
|
||||
/**
|
||||
* @brief Populate services with the servers of the monitors.
|
||||
*/
|
||||
static void populate_services();
|
||||
|
||||
static bool add_server(Monitor* mon, SERVER* server)
|
||||
{
|
||||
return Monitor::add_server(mon, server);
|
||||
}
|
||||
static bool add_server(Monitor* mon, SERVER* server);
|
||||
|
||||
|
||||
static void remove_server(Monitor* mon, SERVER* server)
|
||||
{
|
||||
Monitor::remove_server(mon, server);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop a given monitor
|
||||
*
|
||||
* @param monitor The monitor to stop
|
||||
*/
|
||||
static void monitor_stop(Monitor*);
|
||||
};
|
||||
|
||||
|
||||
|
||||
void monitor_stop(Monitor*);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Mark monitor as deactivated
|
||||
|
||||
Reference in New Issue
Block a user