|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.dbpool.PoolManager
public final class PoolManager
Root of the database pool manager code.
Constructor Summary | |
---|---|
PoolManager()
|
Method Summary | |
---|---|
void |
addMessageListener(IPoolMessageHandler pmh)
|
ConnectionPool |
definePool(java.io.File poolfile,
java.lang.String id)
This defines a pool, taking it's config from a properties file. |
ConnectionPool |
definePool(PoolConfigSource cs,
java.lang.String id)
Defines the pool with the specified ID from the ConfigSource passed. |
ConnectionPool |
definePool(java.lang.String id)
This defines a pool using the default poolfile ".dbpool.properties" stored in the user's home directory. |
ConnectionPool |
definePool(java.lang.String id,
java.lang.String driver,
java.lang.String url,
java.lang.String userid,
java.lang.String password,
java.lang.String driverpath)
|
void |
destroyAll()
Destroy all current pools. |
void |
destroyPool(java.lang.String poolid)
|
static PoolManager |
getInstance()
|
ConnectionPool |
getPool(java.lang.String id)
Finds the named pool. |
int |
getPoolCount()
Return the #of pools currently defined. |
ConnectionPool[] |
getPoolList()
Return all currently defined pools. |
ConnectionPool |
initializePool(java.io.File poolfile,
java.lang.String id)
This combines defining and initializing a pool, taking it's config from a properties file. |
ConnectionPool |
initializePool(PoolConfigSource cs,
java.lang.String id)
This combines defining and initializing a pool. |
ConnectionPool |
initializePool(java.lang.String id)
Initializes the pool defined by ID by pre-allocating the first min connections from it. |
boolean |
isCollectStatistics()
|
void |
logUnexpected(java.lang.Exception t,
java.lang.String s)
|
void |
logUnexpected(java.lang.String s)
|
void |
panic(java.lang.String shortdesc,
java.lang.String body)
|
void |
removeMessageListener(IPoolMessageHandler pmh)
|
void |
sendLogUnexpected(java.lang.Exception t,
java.lang.String s)
|
void |
sendPanic(java.lang.String shortdesc,
java.lang.String body)
|
void |
setCollectStatistics(boolean on)
|
boolean |
startCollecting(java.lang.String key,
InfoCollector collector)
Registers a statistics collection listener for the current thread. |
protected void |
startExpiredConnectionScanner()
Starts the scanner if database locking security is requested. |
InfoCollector |
stopCollecting(java.lang.String key)
Returns the collector with the specified key. |
InfoCollector |
threadCollector()
|
InfoCollectorSink |
threadData()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PoolManager()
Method Detail |
---|
public static PoolManager getInstance()
public void panic(java.lang.String shortdesc, java.lang.String body)
public void logUnexpected(java.lang.Exception t, java.lang.String s)
public void logUnexpected(java.lang.String s)
public void addMessageListener(IPoolMessageHandler pmh)
public void removeMessageListener(IPoolMessageHandler pmh)
public void sendLogUnexpected(java.lang.Exception t, java.lang.String s)
public void sendPanic(java.lang.String shortdesc, java.lang.String body)
public int getPoolCount()
@Nonnull public ConnectionPool getPool(@Nonnull java.lang.String id) throws java.sql.SQLException
java.sql.SQLException
public ConnectionPool[] getPoolList()
public ConnectionPool definePool(PoolConfigSource cs, java.lang.String id) throws java.sql.SQLException
java.sql.SQLException
public ConnectionPool definePool(java.lang.String id, java.lang.String driver, java.lang.String url, java.lang.String userid, java.lang.String password, java.lang.String driverpath) throws java.sql.SQLException
java.sql.SQLException
public ConnectionPool definePool(java.io.File poolfile, java.lang.String id) throws java.lang.Exception
poolfile
- id
-
java.lang.Exception
public ConnectionPool definePool(java.lang.String id) throws java.lang.Exception
id
-
java.lang.Exception
public ConnectionPool initializePool(java.lang.String id) throws java.lang.Exception
java.lang.Exception
public ConnectionPool initializePool(PoolConfigSource cs, java.lang.String id) throws java.sql.SQLException
cs
- The configsource to take definitions fromid
- The ID of the pool to define.
java.lang.Exception
java.sql.SQLException
public ConnectionPool initializePool(java.io.File poolfile, java.lang.String id) throws java.lang.Exception
poolfile
- id
-
java.lang.Exception
public void destroyAll()
public void destroyPool(java.lang.String poolid) throws java.sql.SQLException
java.sql.SQLException
protected void startExpiredConnectionScanner()
public InfoCollectorSink threadData()
public InfoCollector threadCollector()
public boolean startCollecting(java.lang.String key, InfoCollector collector)
public InfoCollector stopCollecting(java.lang.String key)
key
-
public void setCollectStatistics(boolean on)
public boolean isCollectStatistics()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |