MXS-2271 Move free monitor functions into classes

Functions are divided to MonitorManager, Monitor, or the monitored
server.
This commit is contained in:
Esa Korhonen
2019-03-06 14:41:06 +02:00
parent 40f24aaaee
commit a8949b2560
13 changed files with 138 additions and 148 deletions

View File

@ -566,7 +566,7 @@ void ClustrixMonitor::update_server_statuses()
for (auto ms : m_servers)
{
monitor_stash_current_status(ms);
ms->stash_current_status();
auto it = find_if(m_nodes.begin(), m_nodes.end(),
[ms](const std::pair<int,ClustrixNode>& element) -> bool {
@ -580,16 +580,16 @@ void ClustrixMonitor::update_server_statuses()
if (info.is_running())
{
monitor_set_pending_status(ms, SERVER_RUNNING);
ms->set_pending_status(SERVER_RUNNING);
}
else
{
monitor_clear_pending_status(ms, SERVER_RUNNING);
ms->clear_pending_status(SERVER_RUNNING);
}
}
else
{
monitor_clear_pending_status(ms, SERVER_RUNNING);
ms->clear_pending_status(SERVER_RUNNING);
}
}
}