Class ElasticConnectionPool


public class ElasticConnectionPool extends ConnectionPool<ElasticPooledConnection>
Database connection pool based on the apache commons pool implementation. In particular this pool allows you to manage a variable number of connections to the database, opening new ones as needed.

It is possible to configure a maximum number of open connections, but also a minimum number to ensure that open sockets are always available to the db.

The pool uses a mechanism for automatically removing unused connections to avoid having to keep many sockets open unnecessarily.

  • Constructor Details

    • ElasticConnectionPool

      public ElasticConnectionPool(PooledConnectionConfiguration config) throws Exception
      Creates a new instance of an ElasticConnectionPool given the database references and the number of the minimum and maximum available connections.
      Parameters:
      config - instance used to retrieve the pool's configuration parameters
      Throws:
      Exception - in case of some problem during the pool's initialization
  • Method Details