public class MultiPool extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
MultiPool.ConnectionCloser
Support class to close connections in a seperate thread, as some JDBC drivers
have a tendency to hang themselves on a running sql close.
|
| Constructor and Description |
|---|
MultiPool(DatabaseSupport databaseSupport,
String url,
String name,
String password,
int conMax) |
MultiPool(DatabaseSupport databaseSupport,
String url,
String name,
String password,
int conMax,
int maxQueries)
Establish connection to the JDBC Pool(s)
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkTime()
Check the connections
|
protected void |
createPool()
Fills the connection pool
|
protected boolean |
fillPool(boolean logStack)
Fills the connection pool.
|
protected void |
finalize() |
Iterator<MultiConnection> |
getBusyPool()
For reporting purposes the connections in busypool can be listed.
|
(package private) MultiConnection |
getFree()
Get a free connection from the pool
|
(package private) long |
getMaxLifeTime()
Gets the time in ms how long a query may live before it is killed.
|
protected MultiConnection |
getMultiConnection()
Request a new 'real' Connection and wraps it in a new 'MultiConnection' object.
|
Iterator<MultiConnection> |
getPool()
For reporting purposes the connections in pool can be listed.
|
int |
getSize()
get the pool size
|
int |
getTotalConnectionsCreated()
get the number of statements performed
|
(package private) void |
putBack(MultiConnection con)
putback the used connection in the pool
|
protected void |
replaceConnection(MultiConnection multiCon)
Tries to fix this multi-connection if it is broken (e.g.
|
(package private) void |
setMaxLifeTime(long maxLifeTime)
Set the time in ms how long a query may live before it is killed.
|
void |
shutdown()
'realcloses' all connections.
|
String |
toString() |
MultiPool(DatabaseSupport databaseSupport, String url, String name, String password, int conMax) throws SQLException
SQLExceptionMultiPool(DatabaseSupport databaseSupport, String url, String name, String password, int conMax, int maxQueries) throws SQLException
SQLExceptionvoid setMaxLifeTime(long maxLifeTime)
long getMaxLifeTime()
protected void createPool()
protected boolean fillPool(boolean logStack)
protected MultiConnection getMultiConnection() throws SQLException
SQLExceptionprotected void replaceConnection(MultiConnection multiCon) throws SQLException
SQLExceptionpublic void shutdown()
void checkTime()
MultiConnection getFree()
void putBack(MultiConnection con)
public int getSize()
public int getTotalConnectionsCreated()
public Iterator<MultiConnection> getPool()
public Iterator<MultiConnection> getBusyPool()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}