1
/* Copyright (C) 2003 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
#include "SignalData.hpp"
31
friend class MgmtSrvr;
34
STATIC_CONST( SignalLength = 9 + NdbNodeBitmask::Size);
41
Uint32 singleuser; // Indicates whether or not to enter
43
// Only in conjunction with system stop
44
Uint32 singleUserApi; // allowed api in singleuser
46
Int32 apiTimeout; // Timeout before api transactions are refused
47
Int32 transactionTimeout; // Timeout before transactions are aborted
48
Int32 readOperationTimeout; // Timeout before read operations are aborted
49
Int32 operationTimeout; // Timeout before all operations are aborted
51
Uint32 nodes[NdbNodeBitmask::Size];
53
static void setSystemStop(Uint32 & requestInfo, bool value);
54
static void setPerformRestart(Uint32 & requestInfo, bool value);
55
static void setNoStart(Uint32 & requestInfo, bool value);
56
static void setInitialStart(Uint32 & requestInfo, bool value);
58
* Don't perform "graceful" shutdown/restart...
60
static void setStopAbort(Uint32 & requestInfo, bool value);
61
static void setStopNodes(Uint32 & requestInfo, bool value);
63
static bool getSystemStop(const Uint32 & requestInfo);
64
static bool getPerformRestart(const Uint32 & requestInfo);
65
static bool getNoStart(const Uint32 & requestInfo);
66
static bool getInitialStart(const Uint32 & requestInfo);
67
static bool getStopAbort(const Uint32 & requestInfo);
68
static bool getStopNodes(const Uint32 & requestInfo);
73
STATIC_CONST( SignalLength = 2 );
86
friend class MgmtSrvr;
94
STATIC_CONST( SignalLength = 3 );
98
NodeShutdownInProgress = 1,
99
SystemShutdownInProgress = 2,
100
NodeShutdownWouldCauseSystemCrash = 3,
101
TransactionAbortFailed = 4,
102
UnsupportedNodeShutdown = 5,
103
MultiNodeShutdownNotMaster = 6
114
StopReq::getSystemStop(const Uint32 & requestInfo)
116
return requestInfo & 1;
121
StopReq::getPerformRestart(const Uint32 & requestInfo)
123
return requestInfo & 2;
128
StopReq::getNoStart(const Uint32 & requestInfo)
130
return requestInfo & 4;
135
StopReq::getInitialStart(const Uint32 & requestInfo)
137
return requestInfo & 8;
142
StopReq::getStopAbort(const Uint32 & requestInfo)
144
return requestInfo & 32;
149
StopReq::getStopNodes(const Uint32 & requestInfo)
151
return requestInfo & 64;
157
StopReq::setSystemStop(Uint32 & requestInfo, bool value)
167
StopReq::setPerformRestart(Uint32 & requestInfo, bool value)
177
StopReq::setNoStart(Uint32 & requestInfo, bool value)
187
StopReq::setInitialStart(Uint32 & requestInfo, bool value)
197
StopReq::setStopAbort(Uint32 & requestInfo, bool value)
207
StopReq::setStopNodes(Uint32 & requestInfo, bool value)