On this page

DBParam

DBParam Type (Client API)

Client API

DBParam is used to set the several parameters to get the BangDB Environment. Some of the parameters are host ip, port, ssl/non-ssl, transaction type etc. Client connecting with each different DBs will have separate DBParams

C++

Selected

Java

Selected

To get the DB Param environment

 DBParam(); 
To set Host IP
 void setHost(const char *host); 
To set port on which server will be running
 void setPort(const char *port); 
To set path to bangdb.config file
 void setDbConfigPath(const char *dbconfigPath); 
To set path where db files will be kept
 void setDbPath(const char *dbPath); 
To set path where log files will be kept
 void setLogPath(const char *logPath); 
To set path where archive files will be kept
 void setArchivePath(const char *archivePath); 
To open db in transactional or non-transactional mode
 void setTransactionType(TransactionType tranType); 
TransactionType is an enum with following options:
DB_TRANSACTION
DB_OPTIMISTIC_TRANSACTION
DB_PESSIMISTIC_TRANSACTION
To set for sock connection
 void setInitSockConn(bool flag); 
This is to specify if we need to init the socket connection.

To set secure connection
 void setSecureConn(bool flag); 
To get Host IP address
 const char *getHost(); 
User should free the returned data using delete[]

To get host port
 const char *getPort(); 
User should free the returned data using delete[]

To get location of bangdb.config file
 const char *getDbConfigPath(); 
User should free the returned data using delete[]

To get location of DB files
 const char *getDbPath(); 
User should free the returned data using delete[]

To get location of log files
 const char *getLogPath(); 
User should free the returned data using delete[]

To get location of archive files
 const char *getArchivePath(); 
User should free the returned data using delete[]

To get the transaction type
 TransactionType getTranType(); 
TransactionType is an enum with following options:
DB_TRANSACTION
DB_OPTIMISTIC_TRANSACTION
DB_PESSIMISTIC_TRANSACTION

To check sock connection
 bool getInitSockConn(); 
To check for secure connection
 bool getSecureConn(); 

 

 

 

Was this article helpful to you? Yes No