1 /* 2 Copyright (c) 2003, 2021, Oracle and/or its affiliates. 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License, version 2.0, 6 as published by the Free Software Foundation. 7 8 This program is also distributed with certain software (including 9 but not limited to OpenSSL) that is licensed under separate terms, 10 as designated in a particular file or component or in included license 11 documentation. The authors of MySQL hereby grant you an additional 12 permission to link the program and your derivative works with the 13 separately licensed software that they have included with MySQL. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License, version 2.0, for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 */ 24 25 #ifndef READ_NODESCONF_HPP 26 #define READ_NODESCONF_HPP 27 28 #include <NodeBitmask.hpp> 29 30 #define JAM_FILE_ID 199 31 32 33 /** 34 * This signals is sent by Qmgr to NdbCntr 35 * and then from NdbCntr sent to: dih, dict, lqh, tc 36 * 37 * NOTE Only noOfNodes & allNodes are valid when sent from Qmgr 38 */ 39 class ReadNodesConf { 40 /** 41 * Sender(s) 42 */ 43 friend class Qmgr; 44 45 /** 46 * Sender(s) / Reciver(s) 47 */ 48 friend class Ndbcntr; 49 50 /** 51 * Reciver(s) 52 */ 53 friend class Dbdih; 54 friend class Dbdict; 55 friend class Dblqh; 56 friend class Dbtc; 57 friend class Trix; 58 friend class Backup; 59 friend class Suma; 60 friend class LocalProxy; 61 friend class Dbinfo; 62 friend class Dbspj; 63 64 friend bool printREAD_NODES_CONF(FILE*, const Uint32 *, Uint32, Uint16); 65 public: 66 STATIC_CONST( SignalLength = 3 + 5*NdbNodeBitmask::Size ); 67 private: 68 69 Uint32 noOfNodes; 70 Uint32 ndynamicId; 71 72 /** 73 * 74 * NOTE Not valid when send from Qmgr 75 */ 76 Uint32 masterNodeId; 77 78 /** 79 * This array defines all the ndb nodes in the system 80 */ 81 union { 82 Uint32 allNodes[NdbNodeBitmask::Size]; 83 Uint32 definedNodes[NdbNodeBitmask::Size]; 84 }; 85 86 /** 87 * This array describes wheather the nodes are currently active 88 * 89 * NOTE Not valid when send from Qmgr 90 */ 91 Uint32 inactiveNodes[NdbNodeBitmask::Size]; 92 93 Uint32 clusterNodes[NdbNodeBitmask::Size]; // From Qmgr 94 Uint32 startingNodes[NdbNodeBitmask::Size]; // From Cntr 95 Uint32 startedNodes[NdbNodeBitmask::Size]; // From Cntr 96 }; 97 98 99 #undef JAM_FILE_ID 100 101 #endif 102