|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.database.connection.ConnectionPool
A trivial database connection pool implementation. TODO: replace this hack with JNDI/JDBC-based real connection pools.
Method Summary | |
boolean |
closeAll()
Close all free database connections. |
void |
forget(java.sql.Connection c)
Release a failed connection, i.e. close it and forget about it. |
java.sql.Connection |
get(boolean dontwait)
Allocate a Connection object from the connection pool and return it. |
static ConnectionPool |
getInstance()
Factory method. |
void |
release(java.sql.Connection c)
Put a Connection back to the connection pool. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static ConnectionPool getInstance() throws GeneralDatabaseException
GeneralDatabaseException
public java.sql.Connection get(boolean dontwait) throws VOMSException
dontwait
- If true, ignore connection limits and create a new connection if necessary without waiting.
GeneralDatabaseException
- if a database error prevented the allocation of a connection.
VOMSException
public void release(java.sql.Connection c)
public void forget(java.sql.Connection c)
public java.lang.String toString()
public boolean closeAll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |