18 #ifndef Configuration_H
19 #define Configuration_H
21 #include <ndb_global.h>
23 #include <util/BaseString.hpp>
25 #include <kernel_types.h>
27 #include <NdbThread.h>
28 #include <util/SparseBitmask.hpp>
29 #include <util/UtilBuffer.hpp>
30 #include "mt_thr_config.hpp"
35 SocketServerThread = 2,
36 SocketClientThread = 3,
42 #define MAX_NDB_THREADS 256
43 #define NO_LOCK_CPU 0x10000
47 enum ThreadTypes type;
58 bool init(
int _no_start,
int _initial,
63 const char* _bind_adress,
64 NodeId allocated_nodeid);
66 void closeConfiguration(
bool end_session=
true);
68 Uint32 lockPagesInMainMemory()
const;
70 int schedulerExecutionTimer()
const;
71 void schedulerExecutionTimer(
int value);
73 int schedulerSpinTimer()
const;
74 void schedulerSpinTimer(
int value);
76 bool realtimeScheduler()
const;
77 void realtimeScheduler(
bool realtime_on);
79 Uint32 executeLockCPU()
const;
80 void executeLockCPU(Uint32 value);
82 Uint32 maintLockCPU()
const;
83 void maintLockCPU(Uint32 value);
85 void setAllRealtimeScheduler();
86 void setAllLockCPU(
bool exec_thread);
89 enum ThreadTypes type,
93 void removeThreadId(Uint32
index);
94 void yield_main(Uint32 thread_index,
bool start);
95 void initThreadArray();
97 int timeBetweenWatchDogCheck()
const ;
98 void timeBetweenWatchDogCheck(
int value);
100 int maxNoOfErrorLogs()
const ;
101 void maxNoOfErrorLogs(
int val);
103 bool stopOnError()
const;
104 void stopOnError(
bool val);
106 int getRestartOnErrorInsert()
const;
107 void setRestartOnErrorInsert(
int);
110 const char * fileSystemPath()
const;
111 const char * backupFilePath()
const;
113 bool getInitialStart()
const {
return _initialStart; }
117 ConfigRetriever* get_config_retriever() {
return m_config_retriever; };
123 Uint32 get_config_generation()
const;
131 Uint32 m_restartOnErrorInsert;
132 Uint32 _maxErrorLogs;
133 Uint32 _lockPagesInMainMemory;
134 Uint32 _timeBetweenWatchDogCheck;
135 Uint32 _schedulerExecutionTimer;
136 Uint32 _schedulerSpinTimer;
137 Uint32 _realtimeScheduler;
138 Uint32 _timeBetweenWatchDogCheckInitial;
141 NdbMutex *threadIdMutex;
164 Configuration::fileSystemPath()
const {
170 Configuration::backupFilePath()
const {