public final class PoolManager extends Object
Modifier and Type | Method and Description |
---|---|
void |
freeConnection(String strPoolName,
Connection con)
Returns a connection to pool.
|
Connection |
getConnection(String strPoolName)
Returns an available connection from the pool.
|
DataSource |
getDataSource(String strPoolName)
Returns the datasource for a given pool name
|
static PoolManager |
getInstance(InputStream isDbProperties)
This method returns the unique instance of the PoolManager.
|
Collection<ConnectionService> |
getPools()
Returns all pools available
|
ReferenceList |
getPoolsInfos()
Returns pool's infos (currently opened connections)
|
void |
release()
Releases all connections from all the pool.
|
public static PoolManager getInstance(InputStream isDbProperties) throws LuteceInitException
isDbProperties
- An InputStream on a db.properties File to initialiaze the pool if it's not already created.LuteceInitException
- If any error occuredpublic Connection getConnection(String strPoolName)
strPoolName
- The pool namepublic void freeConnection(String strPoolName, Connection con)
strPoolName
- Pool's namecon
- A released connectionpublic void release()
public Collection<ConnectionService> getPools()
public ReferenceList getPoolsInfos()
public DataSource getDataSource(String strPoolName)
strPoolName
- The Pool nameCopyright © 2020 City of Paris. All rights reserved.