|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ds.fw.dbcon.FwConnPool
| Field Summary | |
long |
CONN_CHECK_TIME
Connections Check Time in milliseconds The time interval used in the Thread tr to manage check the connection status. |
long |
CONN_DEFAUT_LIFETIME
Default Life Time; if zero, then the connection has an infinite life time The lifetime is the time interval after the lastUsedTime after which the connection is killed. |
long |
CONN_DEFAUT_TIMEOUT
Default Timeout. |
java.lang.String |
CONN_DRV
The connection driver for the database connection |
java.lang.String |
CONN_PASS
The connection password |
java.lang.String |
CONN_STR
The connect string for the database connection |
java.lang.String |
CONN_TYPE
The connection type |
java.lang.String |
CONN_USER
The connection username |
int |
INCR_NO_OF_CONN
next increment of available connections in the pool |
int |
INIT_NO_OF_CONN
Initial number of available connections in the pool |
int |
MAX_NO_OF_CONN
max number of connections in the pool |
| Constructor Summary | |
FwConnPool()
|
|
| Method Summary | |
void |
FwConnPool()
Constructor of the FwConnPool class |
long |
getConnCheckTime()
Returns the connection check time |
long |
getConnDefaultLifeTime()
Return the connection default life time |
long |
getConnDefaultTimeout()
Returns the default timeout for a connection before been returned to the connection pool |
java.lang.String |
getConnDrv()
Returns the connection driver |
java.sql.Connection |
getConnection()
Returns a connection from the connection pool |
java.lang.String |
getConnPass()
Returns the user password |
java.lang.String |
getConnStr()
Returns the connection string |
java.lang.String |
getConnType()
Returns the Connection Type |
java.lang.String |
getConnUser()
Returns the user name |
com.ds.fw.dbcon.FwDBConnection |
getDBConnection()
Returns a FwDBConnection |
int |
getIncrNoOfConn()
Returns the increment, by which the connections will be increased |
int |
getInitNoOfConn()
Returns the initial number of connections |
int |
getMaxNoOfConn()
Returns the maximum number of connections in the connection pool |
boolean |
killAllConn()
Remove all connections from the connection pool |
boolean |
killConn(java.sql.Connection toBeKill)
Remove a connection from the connection pool |
boolean |
killDBConn(int i)
Remove a connection from the connection pool |
boolean |
releaseConn(java.sql.Connection toBeReleased)
This method is used when releasing a connection |
boolean |
releaseDBConn(int i)
This method is used to release a FwDBConnection |
void |
setConnCheckTime(long ConnCheckTime)
Sets the connection check time in miliseconds |
void |
setConnDefaultLifeTime(long ConnDefaultLifeTime)
Sets the default life time for the connection |
void |
setConnDefaultTimeout(long ConnDefaultTimeout)
Sets the default timeout for a connection before been returned to the connection pool in case some problems occurs during the user session |
void |
setConnDrv(java.lang.String ConnDrv)
Sets the connection driver |
void |
setConnPass(java.lang.String ConnPass)
Sets the user password |
void |
setConnStr(java.lang.String ConnStr)
Sets the connection string |
void |
setConnType(java.lang.String t)
Sets the Connection Type |
void |
setConnUser(java.lang.String ConnUser)
Sets the user name |
void |
setIncrNoOfConn(int IncrNoOfConn)
Sets the number, by which the connections will be increased |
void |
setInitNoOfConn(int InitNoOfConn)
Sets the initial number of connections. |
void |
setMaxNoOfConn(int MaxNoOfConn)
Sets the maximum number of the connections in the connection pool |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.lang.String CONN_STR
public java.lang.String CONN_DRV
public java.lang.String CONN_USER
public java.lang.String CONN_PASS
public java.lang.String CONN_TYPE
public int INIT_NO_OF_CONN
public int INCR_NO_OF_CONN
public int MAX_NO_OF_CONN
public long CONN_CHECK_TIME
public long CONN_DEFAUT_LIFETIME
public long CONN_DEFAUT_TIMEOUT
| Constructor Detail |
public FwConnPool()
| Method Detail |
public void setConnStr(java.lang.String ConnStr)
ConnStr - the connection stringpublic java.lang.String getConnStr()
public void setConnDrv(java.lang.String ConnDrv)
ConnDrv - the connection drivergetConnDrv()public java.lang.String getConnDrv()
setConnDrv(String)public void setConnUser(java.lang.String ConnUser)
ConnUser - the new user namegetConnUser()public java.lang.String getConnUser()
setConnUser(String)public void setConnPass(java.lang.String ConnPass)
ConnPass - the connection passwordpublic java.lang.String getConnPass()
public java.lang.String getConnType()
public void setConnType(java.lang.String t)
t - the connection Typepublic void setInitNoOfConn(int InitNoOfConn)
InitNoOfConn - the initial number of connectionssetIncrNoOfConn(int),
getIncrNoOfConn(),
setMaxNoOfConn(int),
getMaxNoOfConn()public int getInitNoOfConn()
setInitNoOfConn(int)public void setIncrNoOfConn(int IncrNoOfConn)
IncrNoOfConn - the new increment, by which the connections will be increasedgetIncrNoOfConn()public int getIncrNoOfConn()
setIncrNoOfConn(int)public void setMaxNoOfConn(int MaxNoOfConn)
MaxNoOfConn - the new number of connectionsgetMaxNoOfConn()public int getMaxNoOfConn()
setMaxNoOfConn(int)public void setConnCheckTime(long ConnCheckTime)
ConnCheckTime - the connection check timepublic long getConnCheckTime()
public void setConnDefaultLifeTime(long ConnDefaultLifeTime)
ConnDefaultLifeTime - the default life time in milisecondspublic long getConnDefaultLifeTime()
public void setConnDefaultTimeout(long ConnDefaultTimeout)
public long getConnDefaultTimeout()
public void FwConnPool()
public java.sql.Connection getConnection()
public com.ds.fw.dbcon.FwDBConnection getDBConnection()
public boolean releaseConn(java.sql.Connection toBeReleased)
toBeReleased - a connection to be released(as a Connection object)
public boolean releaseDBConn(int i)
i - the position in the vector of the connections
public boolean killConn(java.sql.Connection toBeKill)
toBeKill - a connection to be removed
public boolean killDBConn(int i)
i - the number of the connection in the vector of connections in the connection pool
public boolean killAllConn()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||