mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / include / kernel / signaldata / MasterGCP.hpp
blob24cb8a18211e6b637b5d87fae6aa6322900fc125
1 /* Copyright (c) 2003, 2005 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 #ifndef MASTER_GCP_HPP
17 #define MASTER_GCP_HPP
19 #include <NodeBitmask.hpp>
21 /**
24 class MasterGCPConf {
25 /**
26 * Sender(s) / Reciver(s)
28 friend class Dbdih;
30 public:
31 STATIC_CONST( SignalLength = 8 + NdbNodeBitmask::Size );
33 enum State {
34 GCP_READY = 0,
35 GCP_PREPARE_RECEIVED = 1,
36 GCP_COMMIT_RECEIVED = 2,
37 GCP_TC_FINISHED = 3
39 private:
40 /**
41 * Data replied
43 Uint32 gcpState;
44 Uint32 senderNodeId;
45 Uint32 failedNodeId;
46 Uint32 newGCP;
47 Uint32 latestLCP;
48 Uint32 oldestRestorableGCI;
49 Uint32 keepGCI;
50 Uint32 lcpActive[NdbNodeBitmask::Size];
52 /**
55 class MasterGCPReq {
56 /**
57 * Sender(s) / Reciver(s)
59 friend class Dbdih;
61 public:
62 STATIC_CONST( SignalLength = 2 );
63 private:
64 Uint32 masterRef;
65 Uint32 failedNodeId;
68 /**
71 class MasterGCPRef {
72 /**
73 * Sender(s) / Reciver(s)
75 friend class Dbdih;
77 public:
78 STATIC_CONST( SignalLength = 2 );
79 private:
80 Uint32 senderNodeId;
81 Uint32 failedNodeId;
83 #endif