Commit Graph

55 Commits

Author SHA1 Message Date
bcb7d09a15 MXS-1775 Monitor stopping moved to maxscale::MonitorInstance 2018-05-18 16:00:05 +03:00
1304fd6147 MXS-1775 Move thread main function to maxscale::MonitorInstance 2018-05-18 16:00:05 +03:00
3c277f4e5e MXS-1775 Introduce maxscale::MonitorInstance
- All monitors (but MariaDBMon for the time being) inherit
  from that.
- All common member variables moved to that class. Still
  manipulated in derived classes.

In subsequent commits common functionality will be moved to
that class.
2018-05-18 16:00:05 +03:00
d5871e48ae 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.
2018-05-18 16:00:05 +03:00
8ab247b237 MXS-1848 Introduce maxscape::MonitorApi
The purpose of this template class is to provide the
implementation of the monitor C-api. It's to be instantiated
with the class that actually provides the monitor behaviour.

A separate class maxscale::MonitorInstance will be provided
that then in turn implements the behaviour common to most
monitors. So, the structure will be like:

    class SomeMonitor : public maxscale::MonitorInstance {...}

    extern "C" MXS_MODULE* MXS_CREATE_MODULE()
    {
        static MXS_MODULE info =
        {
            ...
            &maxscale::MonitorApi<SomeMonitor>::s_api,
            ...
        };

        return &info;
    }
2018-05-07 14:48:35 +03:00