Package play.db

Class DefaultConnectionPool

java.lang.Object
play.db.DefaultConnectionPool
All Implemented Interfaces:
ConnectionPool

@Singleton public class DefaultConnectionPool extends Object implements ConnectionPool
Default delegating implementation of the connection pool API.
  • Constructor Details

    • DefaultConnectionPool

      @Inject public DefaultConnectionPool(play.api.db.ConnectionPool connectionPool)
  • Method Details

    • create

      public DataSource create(String name, com.typesafe.config.Config config, Environment environment)
      Description copied from interface: ConnectionPool
      Create a data source with the given configuration.
      Specified by:
      create in interface ConnectionPool
      Parameters:
      name - the database name
      config - the data source configuration
      environment - the database environment
      Returns:
      a data source backed by a connection pool
    • close

      public void close(DataSource dataSource)
      Description copied from interface: ConnectionPool
      Close the given data source.
      Specified by:
      close in interface ConnectionPool
      Parameters:
      dataSource - the data source to close
    • asScala

      public play.api.db.ConnectionPool asScala()
      Specified by:
      asScala in interface ConnectionPool
      Returns:
      the Scala version for this connection pool.