The world's most popular open source database
00001 /* Copyright (C) 2003 MySQL AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00017 #ifndef IPCConfig_H 00018 #define IPCConfig_H 00019 00020 #include <ndb_types.h> 00021 #include <ndb_limits.h> 00022 #include <kernel_types.h> 00023 #include <Properties.hpp> 00024 00029 class IPCConfig 00030 { 00031 public: 00032 IPCConfig(Properties * props); 00033 ~IPCConfig(); 00034 00036 int init(); 00037 00038 NodeId ownId() const; 00039 00041 int configureTransporters(class TransporterRegistry * theTransporterRegistry); 00042 00051 bool getNextRemoteNodeId(NodeId & nodeId) const; 00052 Uint32 getREPHBFrequency(NodeId id) const; 00053 const char* getNodeType(NodeId id) const; 00054 00055 NodeId getNoOfRemoteNodes() const { 00056 return theNoOfRemoteNodes; 00057 } 00058 00059 void print() const { props->print(); } 00060 00061 static Uint32 configureTransporters(Uint32 nodeId, 00062 const struct ndb_mgm_configuration &, 00063 class TransporterRegistry &); 00064 00065 private: 00066 NodeId the_ownId; 00067 Properties * props; 00068 00069 bool addRemoteNodeId(NodeId nodeId); 00070 NodeId theNoOfRemoteNodes; 00071 NodeId theRemoteNodeIds[MAX_NODES]; 00072 }; 00073 00074 inline 00075 NodeId 00076 IPCConfig::ownId() const 00077 { 00078 return the_ownId; 00079 } 00080 00081 00082 00083 #endif // IPCConfig_H
1.4.7

