Class LuteceConnectionService

java.lang.Object
fr.paris.lutece.util.pool.service.LuteceConnectionService
All Implemented Interfaces:
ConnectionService

public class LuteceConnectionService extends Object implements ConnectionService
Lutece Connection Service
  • Constructor Details

    • LuteceConnectionService

      public LuteceConnectionService()
  • Method Details

    • setPoolName

      public void setPoolName(String strPoolName)
      Sets the pool name
      Specified by:
      setPoolName in interface ConnectionService
      Parameters:
      strPoolName - The pool name
    • getPoolName

      public String getPoolName()
      Returns the pool name
      Specified by:
      getPoolName in interface ConnectionService
      Returns:
      The pool name
    • setLogger

      public void setLogger(org.apache.logging.log4j.Logger logger)
      Sets the logger
      Specified by:
      setLogger in interface ConnectionService
      Parameters:
      logger - The logger
    • getLogger

      public org.apache.logging.log4j.Logger getLogger()
      Gets the pool logger
      Specified by:
      getLogger in interface ConnectionService
      Returns:
      The logger
    • init

      public void init(Map<String,String> htParamsConnectionPool)
      Initializes the connection pool
      Specified by:
      init in interface ConnectionService
      Parameters:
      htParamsConnectionPool - Pool parameters
    • getConnection

      public Connection getConnection()
      Get a connection
      Specified by:
      getConnection in interface ConnectionService
      Returns:
      A connection
    • freeConnection

      public void freeConnection(Connection conn)
      Free the connection
      Specified by:
      freeConnection in interface ConnectionService
      Parameters:
      conn - The connection to release
    • release

      public void release()
      Release the pool
      Specified by:
      release in interface ConnectionService
    • getConnectionPool

      public ConnectionPool getConnectionPool()
      Returns the connection pool
      Returns:
      the connection pool
    • getCurrentConnections

      public int getCurrentConnections()
      Gets the number of opened connections
      Specified by:
      getCurrentConnections in interface ConnectionService
      Returns:
      The current connections count
    • getMaxConnections

      public int getMaxConnections()
      Gets the max connections
      Specified by:
      getMaxConnections in interface ConnectionService
      Returns:
      The max connections count
    • getPoolProvider

      public String getPoolProvider()
      Gets the pool manager provider
      Specified by:
      getPoolProvider in interface ConnectionService
      Returns:
      The pool manager
    • getDataSource

      public DataSource getDataSource()
      Get datasource
      Specified by:
      getDataSource in interface ConnectionService
      Returns:
      A data source object