Package play.db
Class DefaultConnectionPool
java.lang.Object
play.db.DefaultConnectionPool
- All Implemented Interfaces:
ConnectionPool
Default delegating implementation of the connection pool API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionplay.api.db.ConnectionPoolasScala()voidclose(DataSource dataSource) Close the given data source.create(String name, com.typesafe.config.Config config, Environment environment) Create a data source with the given configuration.
-
Constructor Details
-
DefaultConnectionPool
@Inject public DefaultConnectionPool(play.api.db.ConnectionPool connectionPool)
-
-
Method Details
-
create
Description copied from interface:ConnectionPoolCreate a data source with the given configuration.- Specified by:
createin interfaceConnectionPool- Parameters:
name- the database nameconfig- the data source configurationenvironment- the database environment- Returns:
- a data source backed by a connection pool
-
close
Description copied from interface:ConnectionPoolClose the given data source.- Specified by:
closein interfaceConnectionPool- Parameters:
dataSource- the data source to close
-
asScala
public play.api.db.ConnectionPool asScala()- Specified by:
asScalain interfaceConnectionPool- Returns:
- the Scala version for this connection pool.
-