Package play.db
Class DefaultConnectionPool
- 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 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.ConnectionPoolasScala()voidclose(DataSource dataSource)Close the given data source.DataSourcecreate(String name, com.typesafe.config.Config config, Environment environment)Create a data source with the given configuration.
-
-
-
Method Detail
-
create
public DataSource create(String name, com.typesafe.config.Config config, Environment environment)
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
public void close(DataSource dataSource)
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.
-
-