Class ConnectionPoolManager


  • public class ConnectionPoolManager
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ConnectionPool getPool​(java.lang.String name)
      Return the connection pool referenced by the name
      void registerPool​(java.lang.String name, ConnectionPool pool)
      Register a nuew connection pool to the global pool table.
      void removePool​(java.lang.String name)
      Remove a pool from the global table.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConnectionPoolManager

        public ConnectionPoolManager()
    • Method Detail

      • registerPool

        public void registerPool​(java.lang.String name,
                                 ConnectionPool pool)
        Register a nuew connection pool to the global pool table. If a pool by that name currently exists, then throw an IllegalArgumentException stating that the pool already exist.
        Parameters:
        name -
        pool -
      • removePool

        public void removePool​(java.lang.String name)
        Remove a pool from the global table. If the pool still has active connections, then only mark this pool as inactive and leave it around until all the existing connections are closed.
        Parameters:
        name -
      • getPool

        public ConnectionPool getPool​(java.lang.String name)
        Return the connection pool referenced by the name
        Parameters:
        name -
        Returns:
        ConnectionPool a reference to the ConnectionPool object stored in the Pool Table. If the named pool does not exist, return null