MXS-1848 Introduce a specific monitor type
Instead of using void there's now a MXS_SPECIFIC_MONITOR struct from which monitor specific types can be derived. This change does not bring about other benefits than a bit of clarity but this is the first step in clearing up the monitor API.
This commit is contained in:
@ -912,7 +912,8 @@ bool MariaDBMonitor::check_sql_files()
|
||||
* @param params Configuration parameters
|
||||
* @return A pointer to MariaDBMonitor specific data. Should be stored in MXS_MONITOR's "handle"-field.
|
||||
*/
|
||||
static void* startMonitor(MXS_MONITOR *monitor, const MXS_CONFIG_PARAMETER* params)
|
||||
static MXS_SPECIFIC_MONITOR* startMonitor(MXS_MONITOR *monitor,
|
||||
const MXS_CONFIG_PARAMETER* params)
|
||||
{
|
||||
return MariaDBMonitor::start(monitor, params);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ typedef std::tr1::unordered_map<MXS_MONITORED_SERVER*, MariaDBServer*> ServerInf
|
||||
typedef std::vector<MariaDBServer*> ServerArray;
|
||||
|
||||
// MariaDB Monitor instance data
|
||||
class MariaDBMonitor
|
||||
class MariaDBMonitor : public MXS_SPECIFIC_MONITOR
|
||||
{
|
||||
private:
|
||||
MariaDBMonitor(const MariaDBMonitor&);
|
||||
|
Reference in New Issue
Block a user