SequoiaDB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
sdbclient::sdbConnectionPoolConf Class Reference

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.
 

Detailed Description

The configure of sdb connection pool.

Constructor & Destructor Documentation

sdbclient::sdbConnectionPoolConf::sdbConnectionPoolConf ( )
inline

brief The constructor of sdbConnectionPoolConf.

Member Function Documentation

INT32 sdbclient::sdbConnectionPoolConf::getCheckInterval ( ) const
inline

Get the interval time in millisecond of check idle connection.

Return values
INT32the interval time in millisecond of check idle connection
string sdbclient::sdbConnectionPoolConf::getCipherFile ( ) const
inline

Get the cipherfile location.

Return values
stringcipherFile
SDB_CONN_STRATEGY sdbclient::sdbConnectionPoolConf::getConnectStrategy ( ) const
inline

Get the strategy of sdbConnectionPool.

Return values
SDB_CONN_STRATEGYThe strategy of sdbConnectionPool
INT32 sdbclient::sdbConnectionPoolConf::getDeltaIncCount ( ) const
inline

Get the increment of connection each time.

Return values
UINT32The increment of connection each time
INT32 sdbclient::sdbConnectionPoolConf::getInitConnCount ( ) const
inline

Get the initial connection number.

Return values
INT32The initial connection number
INT32 sdbclient::sdbConnectionPoolConf::getKeepAliveTimeout ( ) const
inline

Get the keep alive time.

Return values
INT32the keep alive time in millisecond
INT32 sdbclient::sdbConnectionPoolConf::getMaxCount ( ) const
inline

Get the max connection number.

Return values
INT32The max connection number
INT32 sdbclient::sdbConnectionPoolConf::getMaxIdleCount ( ) const
inline

Get the max idle connection number.

Return values
INT32The max idle connection number
string sdbclient::sdbConnectionPoolConf::getPasswd ( ) const
inline

Get password.

Return values
stringpassword
INT32 sdbclient::sdbConnectionPoolConf::getSyncCoordInterval ( ) const
inline

Get the interval time in seconds of synchronize coord node.

Return values
INT32the interval time in seconds of synchronize coord node
string sdbclient::sdbConnectionPoolConf::getToken ( ) const
inline

Get the password encryption token.

Return values
stringencryption token
string sdbclient::sdbConnectionPoolConf::getUserName ( ) const
inline

Get user name.

Return values
stringuser name
BOOLEAN sdbclient::sdbConnectionPoolConf::getUseSSL ( ) const
inline

Get whether use SSL or not.

Return values
BOOLEANReturn use SSL or not
BOOLEAN sdbclient::sdbConnectionPoolConf::getValidateConnection ( ) const
inline

Get whether to check the validation of a connection when it's given out.

Return values
BOOLEANif TRUE check the validation, else not check the validation
BOOLEAN sdbclient::sdbConnectionPoolConf::isValid ( )

Check whether sdbConnectionPoolConf is valid.

Return values
BOOLEANThe validation of sdbConnectionPoolConf
void sdbclient::sdbConnectionPoolConf::setAuthInfo ( const string &  username,
const string &  passwd 
)

Set authentication information.

Parameters
[in]usernameThe user name
[in]passwdThe 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.

Parameters
[in]usernameThe user name
[in]cipherFileThe cipherfile location
[in]tokenThe 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.

Parameters
[in]intervalThe interval time in millisecond of check idle connection
[in]aliveTimeIf 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::sdbConnectionPoolConf::setConnCntInfo ( INT32  initCnt,
INT32  deltaIncCnt,
INT32  maxIdleCnt,
INT32  maxCnt 
)

Set connection number parameters.

Parameters
[in]initCntThe initial connection number
[in]deltaIncCntThe increment of connection each time
[in]maxIdleCntThe max idle connection number
[in]maxCntThe max connection number
void sdbclient::sdbConnectionPoolConf::setConnectStrategy ( SDB_CONN_STRATEGY  strategy)
inline

Set the strategy of sdbConnectionPool.

Parameters
[in]strategyThe enum of strategy: SDB_CONN_STY_SERIAL, SDB_CONN_STY_RANDOM, SDB_CONN_STY_LOCAL, SDB_CONN_STY_BALANCE
void sdbclient::sdbConnectionPoolConf::setSyncCoordInterval ( INT32  interval)
inline

Set the interval time in seconds of synchronize coord node.

Parameters
[in]intervalThe interval time in millisecond of synchronize coord node
void sdbclient::sdbConnectionPoolConf::setUseSSL ( BOOLEAN  useSSL)
inline

Set whether use the SSL or not.

Parameters
[in]useSSLIf true, use SSL, else, not use SSL
void sdbclient::sdbConnectionPoolConf::setValidateConnection ( BOOLEAN  bCheck)
inline

Set whether to check the validation of a connection when it's given out.

Parameters
[in]bCheckIf TURE check the validation, else not check the validation

The documentation for this class was generated from the following file: