Class Pools

java.lang.Object
overit.geocall.sql.Pools

public class Pools extends Object
This class implements the object that contains the HashMap of the ConnectionPool of the application. It exposes the methods to set the pools and extract them, in addition to the iterator on the keys that allows to iterate over the pool names.
  • Constructor Details

    • Pools

      public Pools()
      Main constructor
  • Method Details

    • getPool

      public static ConnectionPool getPool(String name, boolean service)
      Returns the ConnectionPool by extracting it from the map accessing it by name
      Parameters:
      name - The name of the ConnectionPool to extract
      service - Boolean indicating if the ConnectionPool is the service one or not
      Returns:
      The ConnectionPool
    • getServicePool

      public static ConnectionPool getServicePool(String name)
      Returns the service ConnectionPool by extracting it from the map accessing it by name. If the name of the pool starts with "Service", that pool will be used for the service communication, for example for the StaticView loading.
      Parameters:
      name - The name of the service ConnectionPool to extract
      Returns:
      The service ConnectionPool
    • getPool

      public static ConnectionPool getPool(String name)
      Returns the ConnectionPool by extracting it from the map accessing it by name
      Parameters:
      name - The name of the ConnectionPool to extract
      Returns:
      The ConnectionPool
    • nameIterator

      public static Iterator<String> nameIterator()
      Returns an Iterator over the key fields (the names)
      Returns:
      The Iterator over the collection of connection pools
    • removePool

      protected static void removePool(ConnectionPool<?> pool)
    • dispose

      public static void dispose()