Revert "MariaDB Monitor: Move additional classes to separate file"
This reverts commit ff55106610881d55db88eca9e2ef6a056cbc8d51.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef _MARIADBMON_H
|
||||
#define _MARIADBMON_H
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
@ -14,41 +15,29 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file mariadbmon.hh - The MySQL monitor
|
||||
* @file mysqlmon.hh - The MySQL monitor
|
||||
*/
|
||||
|
||||
#include <maxscale/cppdefs.hh>
|
||||
#include <string>
|
||||
#include <tr1/unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <maxscale/config.h>
|
||||
#include <maxscale/dcb.h>
|
||||
#include <maxscale/hashtable.h>
|
||||
#include <maxscale/monitor.h>
|
||||
#include <maxscale/thread.h>
|
||||
|
||||
#include "utilities.hh"
|
||||
|
||||
extern const int PORT_UNKNOWN;
|
||||
extern const int64_t SERVER_ID_UNKNOWN;
|
||||
|
||||
typedef std::tr1::unordered_map<const MXS_MONITORED_SERVER*, MySqlServerInfo> ServerInfoMap;
|
||||
typedef std::vector<MXS_MONITORED_SERVER*> ServerVector;
|
||||
|
||||
using std::string;
|
||||
// MySQL Monitor module instance
|
||||
class MariaDBMonitor
|
||||
class MYSQL_MONITOR
|
||||
{
|
||||
private:
|
||||
MariaDBMonitor(const MariaDBMonitor&);
|
||||
MariaDBMonitor& operator = (const MariaDBMonitor&);
|
||||
public:
|
||||
MariaDBMonitor();
|
||||
~MariaDBMonitor();
|
||||
|
||||
MXS_MONITOR* monitor; /**< Generic monitor object */
|
||||
THREAD thread; /**< Monitor thread */
|
||||
int shutdown; /**< Flag to shutdown the monitor thread */
|
||||
int status; /**< Monitor status */
|
||||
MXS_MONITORED_SERVER *master; /**< Master server for MySQL Master/Slave replication */
|
||||
ServerInfoMap server_info; /**< Contains server specific information */
|
||||
HASHTABLE *server_info; /**< Contains server specific information */
|
||||
bool warn_set_standalone_master; /**< Log a warning when setting standalone master */
|
||||
unsigned long id; /**< Monitor ID */
|
||||
|
||||
@ -78,10 +67,13 @@ public:
|
||||
bool auto_failover; /**< If automatic master failover is enabled */
|
||||
bool auto_rejoin; /**< Attempt to start slave replication on standalone servers or servers
|
||||
* replicating from the wrong master automatically. */
|
||||
ServerVector excluded_servers; /**< Servers banned for master promotion during auto-failover. */
|
||||
MXS_MONITORED_SERVER** excluded_servers; /**< Servers banned for master promotion during auto-failover. */
|
||||
int n_excluded; /**< Number of excluded servers */
|
||||
|
||||
// Other settings
|
||||
string script; /**< Script to call when state changes occur on servers */
|
||||
uint64_t events; /**< enabled events */
|
||||
bool allow_cluster_recovery; /**< Allow failed servers to rejoin the cluster */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user