You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.1 KiB

4 years ago
  1. #if MYSQL_6_9
  2. // Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
  3. //
  4. // MySQL Connector/NET is licensed under the terms of the GPLv2
  5. // <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
  6. // MySQL Connectors. There are special exceptions to the terms and
  7. // conditions of the GPLv2 as it is applied to this software, see the
  8. // FLOSS License Exception
  9. // <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
  10. //
  11. // This program is free software; you can redistribute it and/or modify
  12. // it under the terms of the GNU General Public License as published
  13. // by the Free Software Foundation; version 2 of the License.
  14. //
  15. // This program is distributed in the hope that it will be useful, but
  16. // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  17. // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  18. // for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License along
  21. // with this program; if not, write to the Free Software Foundation, Inc.,
  22. // 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  23. using System;
  24. using System.Collections.Generic;
  25. using System.Text;
  26. namespace Externals.MySql.Data.MySqlClient.Replication
  27. {
  28. /// <summary>
  29. /// Represents a server in Replication environment
  30. /// </summary>
  31. internal class ReplicationServer
  32. {
  33. public ReplicationServer(string name, bool isMaster, string connectionString)
  34. {
  35. Name = name;
  36. IsMaster = isMaster;
  37. ConnectionString = connectionString;
  38. IsAvailable = true;
  39. }
  40. /// <summary>
  41. /// Server name
  42. /// </summary>
  43. public string Name { get; private set; }
  44. /// <summary>
  45. /// Defines if the server is master (True) or slave
  46. /// </summary>
  47. public bool IsMaster { get; private set; }
  48. /// <summary>
  49. /// Connection string used to connect to the server
  50. /// </summary>
  51. public string ConnectionString { get; internal set; }
  52. /// <summary>
  53. /// Defines if the server is available to be considered in load balancing
  54. /// </summary>
  55. public bool IsAvailable { get; set; }
  56. }
  57. }
  58. #endif