|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.util.db.DatabaseConnectionPool
A database connection pool.
| Constructor Summary | |
DatabaseConnectionPool(DatabaseConnector db)
Creates a new database connection pool. |
|
| Method Summary | |
DatabaseConnection |
getConnection()
Returns a database connection from the pool. |
int |
getCurrentSize()
Returns the current connection pool size. |
int |
getMaximumSize()
Returns the maximum connection pool size. |
int |
getMinimumSize()
Returns the minium connection pool size. |
void |
returnConnection(DatabaseConnection con)
Returns a database connection to the pool. |
void |
setMaximumSize(int size)
Sets the maximum connection pool size. |
void |
setMinimumSize(int size)
Sets the minimum connection pool size. |
void |
update()
Updates the connection pool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DatabaseConnectionPool(DatabaseConnector db)
db - the database connector to use| Method Detail |
public int getCurrentSize()
public int getMinimumSize()
setMinimumSize(int)public void setMinimumSize(int size)
size - the new minimum pool sizegetMinimumSize(),
update()public int getMaximumSize()
setMaximumSize(int)public void setMaximumSize(int size)
size - the new maximum pool size, or
a negative value for unlimitedgetMaximumSize(),
update()
public DatabaseConnection getConnection()
throws DatabaseConnectionException
DatabaseConnectionException - if a new database
connection couldn't be createdreturnConnection(org.liquidsite.util.db.DatabaseConnection)public void returnConnection(DatabaseConnection con)
con - the database connectiongetConnection()
public void update()
throws DatabaseConnectionException
DatabaseConnectionException - if new database
connections couldn't be created
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||