|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.module.database.MultiPool
public class MultiPool
JDBC Pool, a dummy interface to multiple real connection
| Nested Class Summary | |
|---|---|
(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 Summary | |
|---|---|
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) |
|
| Method Summary | |
|---|---|
(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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
MultiPool(DatabaseSupport databaseSupport,
String url,
String name,
String password,
int conMax)
throws SQLException
SQLException
MultiPool(DatabaseSupport databaseSupport,
String url,
String name,
String password,
int conMax,
int maxQueries)
throws SQLException
SQLException| Method Detail |
|---|
void setMaxLifeTime(long maxLifeTime)
long getMaxLifeTime()
protected void createPool()
protected boolean fillPool(boolean logStack)
protected MultiConnection getMultiConnection()
throws SQLException
SQLException
protected void replaceConnection(MultiConnection multiCon)
throws SQLException
SQLExceptionprotected void finalize()
finalize in class Objectpublic void shutdown()
void checkTime()
MultiConnection getFree()
void putBack(MultiConnection con)
public int getSize()
public int getTotalConnectionsCreated()
public Iterator<MultiConnection> getPool()
JDBC.listConnections(org.mmbase.util.StringTagger)public Iterator<MultiConnection> getBusyPool()
JDBC.listConnections(org.mmbase.util.StringTagger)public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||