~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/ReadNodesConf.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
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.
 
6
 
 
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.
 
11
 
 
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#ifndef READ_NODESCONF_HPP
 
17
#define READ_NODESCONF_HPP
 
18
 
 
19
#include <NodeBitmask.hpp>
 
20
 
 
21
/**
 
22
 * This signals is sent by Qmgr to NdbCntr
 
23
 *   and then from NdbCntr sent to: dih, dict, lqh, tc
 
24
 *
 
25
 * NOTE Only noOfNodes & allNodes are valid when sent from Qmgr
 
26
 */
 
27
class ReadNodesConf {
 
28
  /**
 
29
   * Sender(s)
 
30
   */
 
31
  friend class Qmgr;
 
32
  
 
33
  /**
 
34
   * Sender(s) / Reciver(s)
 
35
   */
 
36
  friend class Ndbcntr;
 
37
  
 
38
  /**
 
39
   * Reciver(s)
 
40
   */
 
41
  friend class Dbdih;
 
42
  friend class Dbdict;
 
43
  friend class Dblqh;
 
44
  friend class Dbtc;
 
45
  friend class Trix;
 
46
  friend class Backup;
 
47
  friend class Suma;
 
48
  friend class Grep;
 
49
 
 
50
  friend bool printREAD_NODES_CONF(FILE*, const Uint32 *, Uint32, Uint16);
 
51
public:
 
52
  STATIC_CONST( SignalLength = 3 + 5*NdbNodeBitmask::Size );
 
53
private:
 
54
  
 
55
  Uint32 noOfNodes;
 
56
  Uint32 ndynamicId;
 
57
 
 
58
  /**
 
59
   * 
 
60
   * NOTE Not valid when send from Qmgr
 
61
   */
 
62
  Uint32 masterNodeId;
 
63
 
 
64
  /**
 
65
   * This array defines all the ndb nodes in the system
 
66
   */
 
67
  union {
 
68
    Uint32 allNodes[NdbNodeBitmask::Size];
 
69
    Uint32 definedNodes[NdbNodeBitmask::Size];
 
70
  };  
 
71
 
 
72
  /**
 
73
   * This array describes wheather the nodes are currently active
 
74
   *
 
75
   * NOTE Not valid when send from Qmgr
 
76
   */
 
77
  Uint32 inactiveNodes[NdbNodeBitmask::Size];
 
78
 
 
79
  Uint32 clusterNodes[NdbNodeBitmask::Size];  // From Qmgr
 
80
  Uint32 startingNodes[NdbNodeBitmask::Size]; // From Cntr
 
81
  Uint32 startedNodes[NdbNodeBitmask::Size];  // From Cntr
 
82
};
 
83
 
 
84
#endif