Package play.db
Interface ConnectionPool
- All Known Implementing Classes:
DefaultConnectionPool
public interface ConnectionPool
Connection pool API for managing data sources.
-
Method Summary
Modifier and TypeMethodDescriptionplay.api.db.ConnectionPoolasScala()voidclose(DataSource dataSource) Close the given data source.create(String name, com.typesafe.config.Config configuration, Environment environment) Create a data source with the given configuration.
-
Method Details
-
create
Create a data source with the given configuration.- Parameters:
name- the database nameconfiguration- the data source configurationenvironment- the database environment- Returns:
- a data source backed by a connection pool
-
close
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.
-