SequoiaDB
|
The configure of sdb connection pool. More...
#include <sdbConnectionPoolComm.hpp>
Public Member Functions | |
sdbConnectionPoolConf () | |
void | setAuthInfo (const string &username, const string &passwd) |
Set authentication information. | |
void | setAuthInfo (const string &username, const string &cipherFile, const string &token) |
Set authentication information, if a password has been set, the password is preferred over the cipherfile. | |
string | getUserName () const |
Get user name. | |
string | getPasswd () const |
Get password. | |
string | getCipherFile () const |
Get the cipherfile location. | |
string | getToken () const |
Get the password encryption token. | |
void | setConnCntInfo (INT32 initCnt, INT32 deltaIncCnt, INT32 maxIdleCnt, INT32 maxCnt) |
Set connection number parameters. | |
INT32 | getInitConnCount () const |
Get the initial connection number. | |
INT32 | getDeltaIncCount () const |
Get the increment of connection each time. | |
INT32 | getMaxIdleCount () const |
Get the max idle connection number. | |
INT32 | getMaxCount () const |
Get the max connection number. | |
void | 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. | |
INT32 | getCheckInterval () const |
Get the interval time in millisecond of check idle connection. | |
INT32 | getKeepAliveTimeout () const |
Get the keep alive time. | |
void | setSyncCoordInterval (INT32 interval) |
Set the interval time in seconds of synchronize coord node. | |
INT32 | getSyncCoordInterval () const |
Get the interval time in seconds of synchronize coord node. | |
void | setValidateConnection (BOOLEAN bCheck) |
Set whether to check the validation of a connection when it's given out. | |
BOOLEAN | getValidateConnection () const |
Get whether to check the validation of a connection when it's given out. | |
void | setConnectStrategy (SDB_CONN_STRATEGY strategy) |
Set the strategy of sdbConnectionPool. | |
SDB_CONN_STRATEGY | getConnectStrategy () const |
Get the strategy of sdbConnectionPool. | |
void | setUseSSL (BOOLEAN useSSL) |
Set whether use the SSL or not. | |
BOOLEAN | getUseSSL () const |
Get whether use SSL or not. | |
BOOLEAN | isValid () |
Check whether sdbConnectionPoolConf is valid. | |
The configure of sdb connection pool.
|
inline |
brief The constructor of sdbConnectionPoolConf.
|
inline |
Get the interval time in millisecond of check idle connection.
INT32 | the interval time in millisecond of check idle connection |
|
inline |
Get the cipherfile location.
string | cipherFile |
|
inline |
Get the strategy of sdbConnectionPool.
SDB_CONN_STRATEGY | The strategy of sdbConnectionPool |
|
inline |
Get the increment of connection each time.
UINT32 | The increment of connection each time |
|
inline |
Get the initial connection number.
INT32 | The initial connection number |
|
inline |
Get the keep alive time.
INT32 | the keep alive time in millisecond |
|
inline |
Get the max connection number.
INT32 | The max connection number |
|
inline |
Get the max idle connection number.
INT32 | The max idle connection number |
|
inline |
Get password.
string | password |
|
inline |
Get the interval time in seconds of synchronize coord node.
INT32 | the interval time in seconds of synchronize coord node |
|
inline |
Get the password encryption token.
string | encryption token |
|
inline |
Get user name.
string | user name |
|
inline |
Get whether use SSL or not.
BOOLEAN | Return use SSL or not |
|
inline |
Get whether to check the validation of a connection when it's given out.
BOOLEAN | if TRUE check the validation, else not check the validation |
BOOLEAN sdbclient::sdbConnectionPoolConf::isValid | ( | ) |
Check whether sdbConnectionPoolConf is valid.
BOOLEAN | The validation of sdbConnectionPoolConf |
void sdbclient::sdbConnectionPoolConf::setAuthInfo | ( | const string & | username, |
const string & | passwd | ||
) |
Set authentication information.
[in] | username | The user name |
[in] | passwd | The password |
void sdbclient::sdbConnectionPoolConf::setAuthInfo | ( | const string & | username, |
const string & | cipherFile, | ||
const string & | token | ||
) |
Set authentication information, if a password has been set, the password is preferred over the cipherfile.
[in] | username | The user name |
[in] | cipherFile | The cipherfile location |
[in] | token | The password encryption token |
void sdbclient::sdbConnectionPoolConf::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.
[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). |
void sdbclient::sdbConnectionPoolConf::setConnCntInfo | ( | INT32 | initCnt, |
INT32 | deltaIncCnt, | ||
INT32 | maxIdleCnt, | ||
INT32 | maxCnt | ||
) |
Set connection number 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 |
|
inline |
Set the strategy of sdbConnectionPool.
[in] | strategy | The enum of strategy: SDB_CONN_STY_SERIAL, SDB_CONN_STY_RANDOM, SDB_CONN_STY_LOCAL, SDB_CONN_STY_BALANCE |
|
inline |
Set the interval time in seconds of synchronize coord node.
[in] | interval | The interval time in millisecond of synchronize coord node |
|
inline |
Set whether use the SSL or not.
[in] | useSSL | If true, use SSL, else, not use SSL |
|
inline |
Set whether to check the validation of a connection when it's given out.
[in] | bCheck | If TURE check the validation, else not check the validation |