MXS-2271 Monitor config name and instance name are parameters of createInstance()
Also adds/moves some comments from previous entrypoints. Name and module are now constant fields.
This commit is contained in:
@ -27,7 +27,8 @@ const int DEFAULT_HEALTH_PORT = 3581;
|
||||
|
||||
}
|
||||
|
||||
ClustrixMonitor::ClustrixMonitor()
|
||||
ClustrixMonitor::ClustrixMonitor(const string& name, const string& module)
|
||||
: MonitorWorker(name, module)
|
||||
{
|
||||
}
|
||||
|
||||
@ -36,9 +37,9 @@ ClustrixMonitor::~ClustrixMonitor()
|
||||
}
|
||||
|
||||
//static
|
||||
ClustrixMonitor* ClustrixMonitor::create()
|
||||
ClustrixMonitor* ClustrixMonitor::create(const string& name, const string& module)
|
||||
{
|
||||
return new ClustrixMonitor();
|
||||
return new ClustrixMonitor(name, module);
|
||||
}
|
||||
|
||||
bool ClustrixMonitor::configure(const MXS_CONFIG_PARAMETER* pParams)
|
||||
|
||||
@ -60,12 +60,12 @@ public:
|
||||
|
||||
~ClustrixMonitor();
|
||||
|
||||
static ClustrixMonitor* create();
|
||||
static ClustrixMonitor* create(const std::string& name, const std::string& module);
|
||||
|
||||
bool configure(const MXS_CONFIG_PARAMETER* pParams) override;
|
||||
|
||||
private:
|
||||
ClustrixMonitor();
|
||||
ClustrixMonitor(const std::string& name, const std::string& module);
|
||||
|
||||
void pre_loop() override;
|
||||
void post_loop() override;
|
||||
|
||||
Reference in New Issue
Block a user