Class LuteceConnectionService
java.lang.Object
fr.paris.lutece.util.pool.service.LuteceConnectionService
- All Implemented Interfaces:
ConnectionService
Lutece Connection Service
-
Field Summary
Fields inherited from interface fr.paris.lutece.util.pool.service.ConnectionService
INFO_NOT_AVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfreeConnection(Connection conn) Free the connectionGet a connectionReturns the connection poolintGets the number of opened connectionsGet datasourceorg.apache.logging.log4j.LoggerGets the pool loggerintGets the max connectionsReturns the pool nameGets the pool manager providervoidInitializes the connection poolvoidrelease()Release the poolvoidsetLogger(org.apache.logging.log4j.Logger logger) Sets the loggervoidsetPoolName(String strPoolName) Sets the pool name
-
Constructor Details
-
LuteceConnectionService
public LuteceConnectionService()
-
-
Method Details
-
setPoolName
Sets the pool name- Specified by:
setPoolNamein interfaceConnectionService- Parameters:
strPoolName- The pool name
-
getPoolName
Returns the pool name- Specified by:
getPoolNamein interfaceConnectionService- Returns:
- The pool name
-
setLogger
public void setLogger(org.apache.logging.log4j.Logger logger) Sets the logger- Specified by:
setLoggerin interfaceConnectionService- Parameters:
logger- The logger
-
getLogger
public org.apache.logging.log4j.Logger getLogger()Gets the pool logger- Specified by:
getLoggerin interfaceConnectionService- Returns:
- The logger
-
init
Initializes the connection pool- Specified by:
initin interfaceConnectionService- Parameters:
htParamsConnectionPool- Pool parameters
-
getConnection
Get a connection- Specified by:
getConnectionin interfaceConnectionService- Returns:
- A connection
-
freeConnection
Free the connection- Specified by:
freeConnectionin interfaceConnectionService- Parameters:
conn- The connection to release
-
release
public void release()Release the pool- Specified by:
releasein interfaceConnectionService
-
getConnectionPool
Returns the connection pool- Returns:
- the connection pool
-
getCurrentConnections
public int getCurrentConnections()Gets the number of opened connections- Specified by:
getCurrentConnectionsin interfaceConnectionService- Returns:
- The current connections count
-
getMaxConnections
public int getMaxConnections()Gets the max connections- Specified by:
getMaxConnectionsin interfaceConnectionService- Returns:
- The max connections count
-
getPoolProvider
Gets the pool manager provider- Specified by:
getPoolProviderin interfaceConnectionService- Returns:
- The pool manager
-
getDataSource
Get datasource- Specified by:
getDataSourcein interfaceConnectionService- Returns:
- A data source object
-