Package play.db

Class DefaultConnectionPool

  • All Implemented Interfaces:
    ConnectionPool

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

      Constructors 
      Constructor Description
      DefaultConnectionPool​(play.api.db.ConnectionPool connectionPool)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      play.api.db.ConnectionPool asScala()  
      void close​(javax.sql.DataSource dataSource)
      Close the given data source.
      javax.sql.DataSource create​(java.lang.String name, com.typesafe.config.Config config, play.Environment environment)
      Create a data source with the given configuration.
      • Methods inherited from class java.lang.Object

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

      • DefaultConnectionPool

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

      • create

        public javax.sql.DataSource create​(java.lang.String name,
                                           com.typesafe.config.Config config,
                                           play.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​(javax.sql.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.