From a8c878fbcabd7078130ca0e5a9d373554315d6e5 Mon Sep 17 00:00:00 2001 From: Esa Korhonen Date: Tue, 5 Mar 2019 16:04:49 +0200 Subject: [PATCH] MXS-2271 Remove unused setters Runtime configuration changes now go through configure(). --- include/maxscale/monitor.hh | 29 --------------- server/core/monitor.cc | 74 ------------------------------------- 2 files changed, 103 deletions(-) diff --git a/include/maxscale/monitor.hh b/include/maxscale/monitor.hh index e97e61409..77b321b74 100644 --- a/include/maxscale/monitor.hh +++ b/include/maxscale/monitor.hh @@ -236,8 +236,6 @@ public: */ bool set_disk_space_threshold(const std::string& dst_setting); - void set_interval(int64_t interval); - /** * Set status of monitored server. * @@ -262,33 +260,6 @@ public: */ bool clear_server_status(SERVER* srv, int bit, std::string* errmsg_out); - /** - * Set Monitor timeouts for connect/read/write - * - * @param type The timeout handling type - * @param value The timeout to set - * @param key Timeout setting name - */ - bool set_network_timeout(int, int, const char*); - - /** - * Set username used to connect to backends. - * - * @param user The default username to use when connecting - */ - void set_user(const std::string& user); - - /** - * Set password used to connect to backends. - * - * @param passwd The password in encrypted form - */ - void set_password(const std::string& passwd); - - void set_script_timeout(int value); - - void monitor_set_journal_max_age(time_t value); - /** * Create a list of running servers * diff --git a/server/core/monitor.cc b/server/core/monitor.cc index 13bb5d715..1c2771e51 100644 --- a/server/core/monitor.cc +++ b/server/core/monitor.cc @@ -497,16 +497,6 @@ void Monitor::remove_server(SERVER* server) } -void Monitor::set_user(const string& user) -{ - m_settings.conn_settings.username = user; -} - -void Monitor::set_password(const string& passwd) -{ - m_settings.conn_settings.password = passwd; -} - /** * Show all monitors * @@ -633,70 +623,6 @@ Monitor* monitor_repurpose_destroyed(const char* name, const char* module) return rval; } -/** - * Set the monitor sampling interval. - * - * @param interval The sampling interval in milliseconds - */ -void Monitor::set_interval(int64_t interval) -{ - m_settings.interval = interval; -} - -/** - * Set the maximum age of the monitor journal - * - * @param interval The journal age in seconds - */ -void Monitor::monitor_set_journal_max_age(time_t value) -{ - m_settings.journal_max_age = value; -} - -void Monitor::set_script_timeout(int value) -{ - m_settings.script_timeout = value; -} - -bool Monitor::set_network_timeout(int type, int value, const char* key) -{ - bool rval = true; - - if (value > 0) - { - switch (type) - { - case MONITOR_CONNECT_TIMEOUT: - m_settings.conn_settings.connect_timeout = value; - break; - - case MONITOR_READ_TIMEOUT: - m_settings.conn_settings.read_timeout = value; - break; - - case MONITOR_WRITE_TIMEOUT: - m_settings.conn_settings.write_timeout = value; - break; - - case MONITOR_CONNECT_ATTEMPTS: - m_settings.conn_settings.connect_attempts = value; - break; - - default: - MXS_ERROR("Monitor setNetworkTimeout received an unsupported action type %i", type); - mxb_assert(!true); - rval = false; - break; - } - } - else - { - MXS_ERROR("Value '%s' for monitor '%s' is not a positive integer: %d", key, m_name, value); - rval = false; - } - return rval; -} - /** * Return a resultset that has the current set of monitors in it *