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

« back to all changes in this revision

Viewing changes to storage/ndb/src/kernel/blocks/suma/SumaInit.cpp

  • 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
#include "Suma.hpp"
 
17
 
 
18
#include <Properties.hpp>
 
19
#include <Configuration.hpp>
 
20
 
 
21
Suma::Suma(Block_context& ctx) :
 
22
  SimulatedBlock(SUMA, ctx),
 
23
  c_metaSubscribers(c_subscriberPool),
 
24
  c_removeDataSubscribers(c_subscriberPool),
 
25
  c_tables(c_tablePool),
 
26
  c_subscriptions(c_subscriptionPool),
 
27
  Restart(*this),
 
28
  c_gcp_list(c_gcp_pool)
 
29
{
 
30
  BLOCK_CONSTRUCTOR(Suma);
 
31
 
 
32
  // Add received signals
 
33
  addRecSignal(GSN_READ_CONFIG_REQ, &Suma::execREAD_CONFIG_REQ);
 
34
  addRecSignal(GSN_STTOR, &Suma::execSTTOR);
 
35
  addRecSignal(GSN_NDB_STTOR, &Suma::execNDB_STTOR);
 
36
  addRecSignal(GSN_DUMP_STATE_ORD, &Suma::execDUMP_STATE_ORD);
 
37
  addRecSignal(GSN_READ_NODESCONF, &Suma::execREAD_NODESCONF);
 
38
  addRecSignal(GSN_API_START_REP, &Suma::execAPI_START_REP, true);
 
39
  addRecSignal(GSN_API_FAILREQ,  &Suma::execAPI_FAILREQ);
 
40
  addRecSignal(GSN_NODE_FAILREP, &Suma::execNODE_FAILREP);
 
41
  addRecSignal(GSN_INCL_NODEREQ, &Suma::execINCL_NODEREQ);
 
42
  addRecSignal(GSN_CONTINUEB, &Suma::execCONTINUEB);
 
43
  addRecSignal(GSN_SIGNAL_DROPPED_REP, &Suma::execSIGNAL_DROPPED_REP, true);
 
44
  addRecSignal(GSN_UTIL_SEQUENCE_CONF, &Suma::execUTIL_SEQUENCE_CONF);
 
45
  addRecSignal(GSN_UTIL_SEQUENCE_REF, &Suma::execUTIL_SEQUENCE_REF);
 
46
  addRecSignal(GSN_CREATE_SUBID_REQ, 
 
47
               &Suma::execCREATE_SUBID_REQ);
 
48
 
 
49
  addRecSignal(GSN_SUB_CREATE_CONF, &Suma::execSUB_CREATE_CONF);
 
50
  addRecSignal(GSN_SUB_CREATE_REF, &Suma::execSUB_CREATE_REF);
 
51
 
 
52
  addRecSignal(GSN_SUB_START_CONF, &Suma::execSUB_START_CONF);
 
53
  addRecSignal(GSN_SUB_START_REF, &Suma::execSUB_START_REF);
 
54
 
 
55
  addRecSignal(GSN_SUMA_START_ME_REQ, &Suma::execSUMA_START_ME_REQ);
 
56
  addRecSignal(GSN_SUMA_START_ME_REF, &Suma::execSUMA_START_ME_REF);
 
57
  addRecSignal(GSN_SUMA_START_ME_CONF, &Suma::execSUMA_START_ME_CONF);
 
58
  addRecSignal(GSN_SUMA_HANDOVER_REQ, &Suma::execSUMA_HANDOVER_REQ);
 
59
  addRecSignal(GSN_SUMA_HANDOVER_REF, &Suma::execSUMA_HANDOVER_REF);
 
60
  addRecSignal(GSN_SUMA_HANDOVER_CONF, &Suma::execSUMA_HANDOVER_CONF);
 
61
  
 
62
  addRecSignal(GSN_SUB_GCP_COMPLETE_ACK, 
 
63
               &Suma::execSUB_GCP_COMPLETE_ACK);
 
64
  
 
65
  /**
 
66
   * SUMA participant if
 
67
   */
 
68
  addRecSignal(GSN_SUB_CREATE_REQ, &Suma::execSUB_CREATE_REQ);
 
69
  addRecSignal(GSN_SUB_REMOVE_REQ, &Suma::execSUB_REMOVE_REQ);
 
70
  addRecSignal(GSN_SUB_START_REQ, &Suma::execSUB_START_REQ);
 
71
  addRecSignal(GSN_SUB_STOP_REQ, &Suma::execSUB_STOP_REQ);
 
72
  addRecSignal(GSN_SUB_STOP_REF, &Suma::execSUB_STOP_REF);
 
73
  addRecSignal(GSN_SUB_STOP_CONF, &Suma::execSUB_STOP_CONF);
 
74
  addRecSignal(GSN_SUB_SYNC_REQ, &Suma::execSUB_SYNC_REQ);
 
75
 
 
76
  /**
 
77
   * Dict interface
 
78
   */
 
79
  addRecSignal(GSN_DROP_TAB_CONF, &Suma::execDROP_TAB_CONF);
 
80
  addRecSignal(GSN_ALTER_TAB_REQ, &Suma::execALTER_TAB_REQ);
 
81
  addRecSignal(GSN_CREATE_TAB_CONF, &Suma::execCREATE_TAB_CONF);
 
82
 
 
83
#if 0
 
84
  addRecSignal(GSN_LIST_TABLES_CONF, &Suma::execLIST_TABLES_CONF);
 
85
#endif
 
86
  addRecSignal(GSN_GET_TABINFO_CONF, &Suma::execGET_TABINFO_CONF);
 
87
  addRecSignal(GSN_GET_TABINFOREF, &Suma::execGET_TABINFOREF);
 
88
#if 0
 
89
  addRecSignal(GSN_GET_TABLEID_CONF, &Suma::execGET_TABLEID_CONF);
 
90
  addRecSignal(GSN_GET_TABLEID_REF, &Suma::execGET_TABLEID_REF);
 
91
#endif
 
92
  /**
 
93
   * Dih interface
 
94
   */
 
95
  addRecSignal(GSN_DI_FCOUNTCONF, &Suma::execDI_FCOUNTCONF);
 
96
  addRecSignal(GSN_DI_FCOUNTREF, &Suma::execDI_FCOUNTREF);
 
97
  addRecSignal(GSN_DIGETPRIMCONF, &Suma::execDIGETPRIMCONF);
 
98
 
 
99
  /**
 
100
   * Scan interface
 
101
   */
 
102
  addRecSignal(GSN_SCAN_HBREP, &Suma::execSCAN_HBREP);
 
103
  addRecSignal(GSN_TRANSID_AI, &Suma::execTRANSID_AI);
 
104
  addRecSignal(GSN_SCAN_FRAGREF, &Suma::execSCAN_FRAGREF);
 
105
  addRecSignal(GSN_SCAN_FRAGCONF, &Suma::execSCAN_FRAGCONF);
 
106
#if 0
 
107
  addRecSignal(GSN_SUB_SYNC_CONTINUE_REF, 
 
108
               &Suma::execSUB_SYNC_CONTINUE_REF);
 
109
#endif
 
110
  addRecSignal(GSN_SUB_SYNC_CONTINUE_CONF, 
 
111
               &Suma::execSUB_SYNC_CONTINUE_CONF);
 
112
  
 
113
  /**
 
114
   * Trigger stuff
 
115
   */
 
116
  addRecSignal(GSN_TRIG_ATTRINFO, &Suma::execTRIG_ATTRINFO);
 
117
  addRecSignal(GSN_FIRE_TRIG_ORD, &Suma::execFIRE_TRIG_ORD);
 
118
 
 
119
  addRecSignal(GSN_CREATE_TRIG_REF, &Suma::execCREATE_TRIG_REF);
 
120
  addRecSignal(GSN_CREATE_TRIG_CONF, &Suma::execCREATE_TRIG_CONF);
 
121
  addRecSignal(GSN_DROP_TRIG_REF, &Suma::execDROP_TRIG_REF);
 
122
  addRecSignal(GSN_DROP_TRIG_CONF, &Suma::execDROP_TRIG_CONF);
 
123
  
 
124
  addRecSignal(GSN_SUB_GCP_COMPLETE_REP, 
 
125
               &Suma::execSUB_GCP_COMPLETE_REP);
 
126
 
 
127
  c_startup.m_restart_server_node_id = RNIL; // Server for my NR
 
128
}
 
129
 
 
130
Suma::~Suma()
 
131
{
 
132
}
 
133
 
 
134
BLOCK_FUNCTIONS(Suma)
 
135