全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 ページ
haNameResolver.h
1 #ifndef BZS_DB_PROTOCOL_TDAP_CLIENT_HANAME_RESOLVER_H
2 #define BZS_DB_PROTOCOL_TDAP_CLIENT_HANAME_RESOLVER_H
3 /* =================================================================
4  Copyright (C) 2016 BizStation Corp All rights reserved.
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19  02111-1307, USA.
20  ================================================================= */
21 #include "export.h"
22 
23 namespace bzs
24 {
25 namespace db
26 {
27 namespace protocol
28 {
29 namespace tdap
30 {
31 namespace client
32 {
33 
34 /* haNameResolver::start() result code */
35 #define THNR_SUCCESS 0
36 #define THNR_SLAVE_HOSTS_NOT_FOUND 1
37 #define THNR_INVALID_HOSTS 2
38 #define THNR_REGISTER_FUNC_ERROR 3
39 
40 
41 #define THNR_OPT_DISABLE_CALL_FAILOVER 1
42 #define THNR_OPT_MASTER_CAN_CONCUR_SLAVE 2
43 #define THNR_OPT_FO_READONLY_CONTROL 4
44 
45 class DLLLIB haNameResolver
46 {
47 private:
50  ~haNameResolver();
51  haNameResolver& operator=(const haNameResolver&);
52 public:
53 
54  /* The slaves and the slaveHostsWithPort can be specified comma separated names. */
55  static int start(const char* master, const char* slaves,
56  const char* slaveHostsWithPort, short slaveNum,
57  const char* userName,
58  const char* password,
59  int option = 0);
60  static void addPortMap(short mysqlPort, short transactdPort);
61  static void clearPortMap();
62  static void stop();
63  static const char* master();
64  static const char* slave();
65 };
66 
67 } // namespace client
68 } // namespace tdap
69 } // namespace protocol
70 } // namespace db
71 } // namespace bzs
72 
73 #endif // BZS_DB_PROTOCOL_TDAP_CLIENT_HANAME_RESOLVER_H
74 
Transactd HA(高可用)運用のためホスト名リゾルバー (THNRと呼びます)
Definition: haNameResolver.h:45

Transactd SDK 2018年07月31日(火) 19時40分21秒 doxygen