The configure of sdb data source.
More...
#include <sdbDataSourceComm.hpp>
The configure of sdb data source.
sdbclient::sdbDataSourceConf::sdbDataSourceConf |
( |
| ) |
|
|
inline |
INT32 sdbclient::sdbDataSourceConf::getCheckInterval |
( |
| ) |
const |
|
inline |
Get the interval time in millisecond of check idle connection.
- Return values
-
INT32 | the interval time in millisecond of check idle connection |
INT32 sdbclient::sdbDataSourceConf::getDeltaIncCount |
( |
| ) |
const |
|
inline |
Get the increment of connection each time.
- Return values
-
UINT32 | The increment of connection each time |
INT32 sdbclient::sdbDataSourceConf::getInitConnCount |
( |
| ) |
const |
|
inline |
Get the initial connection number.
- Return values
-
INT32 | The initial connection number |
INT32 sdbclient::sdbDataSourceConf::getKeepAliveTimeout |
( |
| ) |
const |
|
inline |
Get the keep alive time.
- Return values
-
INT32 | the keep alive time in millisecond |
INT32 sdbclient::sdbDataSourceConf::getMaxCount |
( |
| ) |
const |
|
inline |
Get the max connection number.
- Return values
-
INT32 | The max connection number |
INT32 sdbclient::sdbDataSourceConf::getMaxIdleCount |
( |
| ) |
const |
|
inline |
Get the max idle connection number.
- Return values
-
INT32 | The max idle connection number |
string sdbclient::sdbDataSourceConf::getPasswd |
( |
| ) |
const |
|
inline |
Get password.
- Return values
-
INT32 sdbclient::sdbDataSourceConf::getSyncCoordInterval |
( |
| ) |
const |
|
inline |
Get the interval time in seconds of synchronize coord node.
- Return values
-
INT32 | the interval time in seconds of synchronize coord node |
string sdbclient::sdbDataSourceConf::getUserName |
( |
| ) |
const |
|
inline |
Get user name.
- Return values
-
BOOLEAN sdbclient::sdbDataSourceConf::getUseSSL |
( |
| ) |
const |
|
inline |
Get whether use SSL or not.
- Return values
-
BOOLEAN | Return use SSL or not |
BOOLEAN sdbclient::sdbDataSourceConf::getValidateConnection |
( |
| ) |
const |
|
inline |
Get whether to check the validation of a connection when it's given out.
- Return values
-
BOOLEAN | if TRUE check the validation, else not check the validation |
BOOLEAN sdbclient::sdbDataSourceConf::isValid |
( |
| ) |
|
void sdbclient::sdbDataSourceConf::setCheckIntervalInfo |
( |
INT32 |
interval, |
|
|
INT32 |
aliveTime = 0 |
|
) |
| |
Set the interval time of check idle connection. And set the time in millisecond for abandoning a connection which keep alive time is up.
- Parameters
-
[in] | interval | The interval time in millisecond of check idle connection |
[in] | aliveTime | If a connection has not be used(send and receive) for a long time(longer than "aliveTime"), the pool will not let it come back. The pool will also clean this kind of idle connections in the pool periodically. This value default to be 0ms. means not care about how long does a connection have not be used(send and receive). |
- Note
- When "aliveTime" is not set to 0, it's better to set it greater than "interval" triple over. Besides, unless you know what you need, never enable this option.
void sdbclient::sdbDataSourceConf::setConnCntInfo |
( |
INT32 |
initCnt, |
|
|
INT32 |
deltaIncCnt, |
|
|
INT32 |
maxIdleCnt, |
|
|
INT32 |
maxCnt |
|
) |
| |
Set connection number parameters.
- Parameters
-
[in] | initCnt | The initial connection number |
[in] | deltaIncCnt | The increment of connection each time |
[in] | maxIdleCnt | The max idle connection number |
[in] | maxCnt | The max connection number |
Set the strategy of sdbDataSource.
- Parameters
-
[in] | strategy | The enum of strategy: DS_STY_SERIAL, DS_STY_RANDOM, DS_STY_LOCAL, DS_STY_BALANCE |
void sdbclient::sdbDataSourceConf::setSyncCoordInterval |
( |
INT32 |
interval | ) |
|
|
inline |
Set the interval time in seconds of synchronize coord node.
- Parameters
-
[in] | interval | The interval time in millisecond of synchronize coord node |
void sdbclient::sdbDataSourceConf::setUserInfo |
( |
const string & |
username, |
|
|
const string & |
passwd |
|
) |
| |
Set user name and password.
- Parameters
-
[in] | username | The user name |
[in] | passwd | The password |
void sdbclient::sdbDataSourceConf::setUseSSL |
( |
BOOLEAN |
useSSL | ) |
|
|
inline |
Set whether use the SSL or not.
- Parameters
-
[in] | useSSL | If true, use SSL, else, not use SSL |
void sdbclient::sdbDataSourceConf::setValidateConnection |
( |
BOOLEAN |
bCheck | ) |
|
|
inline |
Set whether to check the validation of a connection when it's given out.
- Parameters
-
[in] | bCheck | If TURE check the validation, else not check the validation |
The documentation for this class was generated from the following file: