Package play.db

Interface ConnectionPool

  • All Known Implementing Classes:
    DefaultConnectionPool

    public interface ConnectionPool
    Connection pool API for managing data sources.
    • Method Detail

      • create

        DataSource create​(String name,
                          com.typesafe.config.Config configuration,
                          Environment environment)
        Create a data source with the given configuration.
        Parameters:
        name - the database name
        configuration - the data source configuration
        environment - the database environment
        Returns:
        a data source backed by a connection pool
      • close

        void close​(DataSource dataSource)
        Close the given data source.
        Parameters:
        dataSource - the data source to close
      • asScala

        play.api.db.ConnectionPool asScala()
        Returns:
        the Scala version for this connection pool.