#include <Config.h>
Collaboration diagram for Config:
Public Member Functions | |
int | readAllValues (char *filename) |
void | print () |
int | getPageSize () |
int | getMaxProcs () |
long | getMaxSysDbSize () |
long | getMaxDbSize () |
int | getSysDbKey () |
int | getUserDbKey () |
char * | getLogFile () |
char * | getDbFile () |
long | getMapAddress () |
int | getMutexSecs () |
int | getMutexUSecs () |
int | getMutexRetries () |
int | getLockSecs () |
int | getLockUSecs () |
int | getLockRetries () |
bool | useCache () |
char * | getDSN () |
char * | getTableConfigFile () |
bool | useReplication () |
char * | getReplConfigFile () |
long | getMaxLogStoreSize () |
int | getNetworkID () |
int | getCacheNetworkID () |
int | getNetworkResponseTimeout () |
int | getNetworkConnectTimeout () |
bool | useTwoWayCache () |
int | getCacheWaitSecs () |
Definition at line 86 of file Config.h.
int Config::getCacheNetworkID | ( | ) | [inline] |
Definition at line 119 of file Config.h.
References ConfigValues::cacheNetworkID.
00119 { return cVal.cacheNetworkID; }
int Config::getCacheWaitSecs | ( | ) | [inline] |
Definition at line 123 of file Config.h.
References ConfigValues::cacheWaitSecs.
Referenced by main(), and print().
00123 { return cVal.cacheWaitSecs; }
Here is the caller graph for this function:
char* Config::getDbFile | ( | ) | [inline] |
Definition at line 104 of file Config.h.
References ConfigValues::dbFile.
Referenced by print().
00104 { return cVal.dbFile; }
Here is the caller graph for this function:
char* Config::getDSN | ( | ) | [inline] |
Definition at line 113 of file Config.h.
References ConfigValues::dsn.
Referenced by print().
00113 { return cVal.dsn; }
Here is the caller graph for this function:
int Config::getLockRetries | ( | ) | [inline] |
Definition at line 111 of file Config.h.
References ConfigValues::lockRetries.
Referenced by print().
00111 { return cVal.lockRetries; }
Here is the caller graph for this function:
int Config::getLockSecs | ( | ) | [inline] |
Definition at line 109 of file Config.h.
References ConfigValues::lockSecs.
Referenced by LockManager::getExclusiveLock(), LockManager::getSharedLock(), and print().
00109 { return cVal.lockSecs; }
Here is the caller graph for this function:
int Config::getLockUSecs | ( | ) | [inline] |
Definition at line 110 of file Config.h.
References ConfigValues::lockUSecs.
Referenced by LockManager::getExclusiveLock(), LockManager::getSharedLock(), and print().
00110 { return cVal.lockUSecs; }
Here is the caller graph for this function:
char* Config::getLogFile | ( | ) | [inline] |
Definition at line 103 of file Config.h.
References ConfigValues::logFile.
Referenced by print().
00103 { return cVal.logFile; }
Here is the caller graph for this function:
long Config::getMapAddress | ( | ) | [inline] |
Definition at line 105 of file Config.h.
References ConfigValues::mapAddr.
Referenced by print().
00105 { return cVal.mapAddr; }
Here is the caller graph for this function:
long Config::getMaxDbSize | ( | ) | [inline] |
Definition at line 100 of file Config.h.
References ConfigValues::maxDbSize.
Referenced by DatabaseManagerImpl::openDatabase(), and print().
00100 { return cVal.maxDbSize; }
Here is the caller graph for this function:
long Config::getMaxLogStoreSize | ( | ) | [inline] |
Definition at line 117 of file Config.h.
References ConfigValues::logStoreSize.
00117 { return cVal.logStoreSize; }
int Config::getMaxProcs | ( | ) | [inline] |
Definition at line 98 of file Config.h.
References ConfigValues::maxProcs.
Referenced by cleanupDeadProcs(), ProcessManager::isAnyOneRegistered(), logActiveProcs(), print(), TransactionManager::printDebugInfo(), ProcessManager::printDebugInfo(), TransactionManager::printUsageStatistics(), ProcessManager::printUsageStatistics(), ProcessManager::registerThread(), and TransactionManager::startTransaction().
00098 { return cVal.maxProcs; }
Here is the caller graph for this function:
long Config::getMaxSysDbSize | ( | ) | [inline] |
Definition at line 99 of file Config.h.
References ConfigValues::maxSysSize.
Referenced by DatabaseManagerImpl::createDatabase(), DatabaseManagerImpl::openDatabase(), and print().
00099 { return cVal.maxSysSize; }
Here is the caller graph for this function:
int Config::getMutexRetries | ( | ) | [inline] |
Definition at line 108 of file Config.h.
References ConfigValues::mutexRetries.
Referenced by print(), and Mutex::tryLock().
00108 { return cVal.mutexRetries; }
Here is the caller graph for this function:
int Config::getMutexSecs | ( | ) | [inline] |
Definition at line 106 of file Config.h.
References ConfigValues::mutexSecs.
Referenced by TableImpl::fetchNoBind(), print(), and Mutex::tryLock().
00106 { return cVal.mutexSecs; }
Here is the caller graph for this function:
int Config::getMutexUSecs | ( | ) | [inline] |
Definition at line 107 of file Config.h.
References ConfigValues::mutexUSecs.
Referenced by TableImpl::fetchNoBind(), print(), and Mutex::tryLock().
00107 { return cVal.mutexUSecs; }
Here is the caller graph for this function:
int Config::getNetworkConnectTimeout | ( | ) | [inline] |
Definition at line 121 of file Config.h.
References ConfigValues::nwConnectTimeout.
Referenced by UDPClient::connect(), and TCPClient::connect().
00121 { return cVal.nwConnectTimeout; }
Here is the caller graph for this function:
int Config::getNetworkID | ( | ) | [inline] |
Definition at line 118 of file Config.h.
References ConfigValues::networkID.
00118 { return cVal.networkID; }
int Config::getNetworkResponseTimeout | ( | ) | [inline] |
Definition at line 120 of file Config.h.
References ConfigValues::nwResponseTimeout.
Referenced by UDPServer::handleClient(), UDPClient::receive(), and TCPClient::receive().
00120 { return cVal.nwResponseTimeout; }
Here is the caller graph for this function:
int Config::getPageSize | ( | ) | [inline] |
Definition at line 97 of file Config.h.
References ConfigValues::pageSize.
Referenced by print().
00097 { return cVal.pageSize; }
Here is the caller graph for this function:
char* Config::getReplConfigFile | ( | ) | [inline] |
Definition at line 116 of file Config.h.
References ConfigValues::replConfigFile.
00116 { return cVal.replConfigFile; }
int Config::getSysDbKey | ( | ) | [inline] |
Definition at line 101 of file Config.h.
References ConfigValues::sysDbKey.
Referenced by DatabaseManagerImpl::createDatabase(), DatabaseManagerImpl::openDatabase(), and print().
00101 { return cVal.sysDbKey; }
Here is the caller graph for this function:
char* Config::getTableConfigFile | ( | ) | [inline] |
Definition at line 114 of file Config.h.
References ConfigValues::tableConfigFile.
Referenced by print().
00114 { return cVal.tableConfigFile; }
Here is the caller graph for this function:
int Config::getUserDbKey | ( | ) | [inline] |
Definition at line 102 of file Config.h.
References ConfigValues::userDbKey.
Referenced by DatabaseManagerImpl::createDatabase(), DatabaseManagerImpl::openDatabase(), and print().
00102 { return cVal.userDbKey; }
Here is the caller graph for this function:
void Config::print | ( | ) |
Definition at line 338 of file Config.cxx.
References getCacheWaitSecs(), getDbFile(), getDSN(), getLockRetries(), getLockSecs(), getLockUSecs(), getLogFile(), getMapAddress(), getMaxDbSize(), getMaxProcs(), getMaxSysDbSize(), getMutexRetries(), getMutexSecs(), getMutexUSecs(), getPageSize(), getSysDbKey(), getTableConfigFile(), getUserDbKey(), useCache(), and useTwoWayCache().
Referenced by SessionImpl::initSystemDatabase().
00339 { 00340 printf("ConfigValues\n"); 00341 printf(" getPageSize %d\n", getPageSize()); 00342 printf(" getMaxProcs %d\n", getMaxProcs()); 00343 printf(" getMaxSysDbSize %ld\n", getMaxSysDbSize()); 00344 printf(" getMaxDbSize %ld\n", getMaxDbSize()); 00345 printf(" getSysDbKey %d\n", getSysDbKey()); 00346 printf(" getUserDbKey %d\n", getUserDbKey()); 00347 printf(" getLogFile %s\n", getLogFile()); 00348 printf(" getDatabaseFile %s\n", getDbFile()); 00349 printf(" getMapAddress %ld\n", getMapAddress()); 00350 printf(" getMutexSecs %d\n", getMutexSecs()); 00351 printf(" getMutexUSecs %d\n", getMutexUSecs()); 00352 printf(" getMutexRetries %d\n", getMutexRetries()); 00353 printf(" getLockSecs %d\n", getLockSecs()); 00354 printf(" getLockUSecs %d\n", getLockUSecs()); 00355 printf(" getLockRetries %d\n", getLockRetries()); 00356 printf(" useCache %d\n", useCache()); 00357 printf(" getDSN %s\n", getDSN()); 00358 printf(" getTableConfigFile %s\n", getTableConfigFile()); 00359 printf(" isTwoWayCache %d\n", useTwoWayCache()); 00360 printf(" getCacheWaitSecs %d\n", getCacheWaitSecs()); 00361 //printf(" useReplication %d\n", useReplication()); 00362 //printf(" getReplConfigFile %s\n", getReplConfigFile()); 00363 //printf(" getMaxLogStoreSize %ld\n", getMaxLogStoreSize()); 00364 //printf(" getNetworkID %d\n", getNetworkID()); 00365 //printf(" getCacheNetworkID %d\n", getCacheNetworkID()); 00366 }
Here is the call graph for this function:
Here is the caller graph for this function:
int Config::readAllValues | ( | char * | filename | ) |
Definition at line 293 of file Config.cxx.
References ErrSysInit, and printError.
Referenced by SessionImpl::readConfigFile().
00294 { 00295 FILE *fp; 00296 00297 fp = fopen(fileName,"r"); 00298 if( fp == NULL ) { 00299 printError(ErrSysInit, "Invalid path/filename in CSQL_CONFIG_FILE."); 00300 return 1; 00301 } 00302 00303 int hasData = 1; 00304 char buffer[1024]; 00305 char key[1024]; 00306 char value[1024]; 00307 while (hasData) 00308 { 00309 memset(buffer, 0, 1024); 00310 //int ret = fscanf(fp,"%s\r",buffer); 00311 int ret = readLine(fp, buffer); 00312 if (ret == EOF) break; 00313 bool isComment= false; 00314 int posEqual =0; 00315 for (int i = 0; i <1024; i++) 00316 { 00317 if (buffer[i] == '=' ) posEqual=i; 00318 else if (buffer[i] == '#' ) { isComment = true; break; } 00319 else if (buffer[i] == '\n') { break; } 00320 else if (buffer[i] == '\0') { break; } 00321 } 00322 if (isComment) continue; 00323 if (!posEqual) continue; 00324 strncpy(key, buffer, posEqual); 00325 key[posEqual] = '\0'; 00326 posEqual++; 00327 strcpy(value, &buffer[posEqual]); 00328 storeKeyVal(key, value); 00329 } 00330 fclose(fp); 00331 if (validateValues()) 00332 { 00333 return 1; 00334 } 00335 00336 return 0; 00337 }
Here is the caller graph for this function:
bool Config::useCache | ( | ) | [inline] |
Definition at line 112 of file Config.h.
References ConfigValues::isCache.
Referenced by print().
00112 { return cVal.isCache; }
Here is the caller graph for this function:
bool Config::useReplication | ( | ) | [inline] |
Definition at line 115 of file Config.h.
References ConfigValues::isReplication.
00115 { return cVal.isReplication; }
bool Config::useTwoWayCache | ( | ) | [inline] |
Definition at line 122 of file Config.h.
References ConfigValues::isTwoWay.
Referenced by print().
00122 { return cVal.isTwoWay; }
Here is the caller graph for this function: