~vlad-lesin/percona-server/mysql-5.0.33-original

« back to all changes in this revision

Viewing changes to ndb/include/kernel/signaldata/NodeStateSignalData.hpp

  • Committer: Vlad Lesin
  • Date: 2012-07-31 09:21:34 UTC
  • Revision ID: vladislav.lesin@percona.com-20120731092134-zfodx022b7992wsi
VirginĀ 5.0.33

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; either version 2 of the License, or
 
6
   (at your option) any later version.
 
7
 
 
8
   This program is distributed in the hope that it will be useful,
 
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
   GNU General Public License for more details.
 
12
 
 
13
   You should have received a copy of the GNU General Public License
 
14
   along with this program; if not, write to the Free Software
 
15
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
16
 
 
17
#ifndef NODE_STATE_SIGNAL_DATA_HPP
 
18
#define NODE_STATE_SIGNAL_DATA_HPP
 
19
 
 
20
#include <NodeState.hpp>
 
21
 
 
22
/**
 
23
 * NodeStateRep
 
24
 *
 
25
 * Sent so that all blocks will update their NodeState
 
26
 */
 
27
class NodeStateRep {
 
28
  /**
 
29
   * Sender(s)
 
30
   */
 
31
  friend class Ndbcntr;
 
32
  
 
33
  /**
 
34
   * Reciver
 
35
   */
 
36
  friend class SimulatedBlock;
 
37
  
 
38
public:
 
39
  STATIC_CONST( SignalLength = NodeState::DataLength );
 
40
private:
 
41
  
 
42
  NodeState nodeState;
 
43
};
 
44
 
 
45
/**
 
46
 * ChangeNodeStateReq
 
47
 *
 
48
 * Sent by NdbCntr when synchronous NodeState updates are needed
 
49
 */
 
50
class ChangeNodeStateReq {
 
51
  /**
 
52
   * Sender(s)
 
53
   */
 
54
  friend class Ndbcntr;
 
55
  
 
56
  /**
 
57
   * Reciver
 
58
   */
 
59
  friend class SimulatedBlock;
 
60
  
 
61
public:
 
62
  STATIC_CONST( SignalLength = 2 + NodeState::DataLength );
 
63
public:
 
64
  
 
65
  Uint32 senderRef;
 
66
  Uint32 senderData;
 
67
  NodeState nodeState;
 
68
};
 
69
 
 
70
/**
 
71
 * ChangeNodeStateConf
 
72
 *
 
73
 * Sent by SimulatedBlock as a confirmation to ChangeNodeStateReq
 
74
 */
 
75
class ChangeNodeStateConf {
 
76
  /**
 
77
   * Sender(s)
 
78
   */
 
79
  friend class SimulatedBlock;
 
80
  
 
81
  /**
 
82
   * Reciver
 
83
   */
 
84
  friend class NdbCntr;
 
85
  
 
86
public:
 
87
  STATIC_CONST( SignalLength = 1 );
 
88
private:
 
89
  
 
90
  Uint32 senderData;
 
91
};
 
92
 
 
93
 
 
94
#endif