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.ConnectionPool
asScala()
void
close(DataSource dataSource)
Close the given data source.DataSource
create(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:ConnectionPool
Create a data source with the given configuration.- Specified by:
create
in 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:ConnectionPool
Close the given data source.- Specified by:
close
in interfaceConnectionPool
- Parameters:
dataSource
- the data source to close
-
asScala
public play.api.db.ConnectionPool asScala()
- Specified by:
asScala
in interfaceConnectionPool
- Returns:
- the Scala version for this connection pool.
-
-