object ConnectionPool extends LogSupport
Connection Pool
The default implementation uses Commons DBCP 2 internally.
- Alphabetic
- By Inheritance
- ConnectionPool
- LogSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type CPFactory = ConnectionPoolFactory
- type CPSettings = ConnectionPoolSettings
- type MutableMap[A, B] = HashMap[A, B]
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val DEFAULT_CONNECTION_POOL_FACTORY: Commons2ConnectionPoolFactory.type
- val DEFAULT_NAME: String
- def add(name: Any, dataSource: AuthenticatedDataSourceConnectionPool): Unit
Registers new named Connection pool.
Registers new named Connection pool.
- name
pool name
- dataSource
DataSource based ConnectionPool
- def add(name: Any, dataSource: DataSourceConnectionPool): Unit
Registers new named Connection pool.
Registers new named Connection pool.
- name
pool name
- dataSource
DataSource based ConnectionPool
- def add(name: Any, url: String, user: String, password: String, settings: CPSettings = ConnectionPoolSettings())(implicit factory: CPFactory = DEFAULT_CONNECTION_POOL_FACTORY, ec: ExecutionContext = DEFAULT_EXECUTION_CONTEXT): Unit
Registers new named Connection pool.
Registers new named Connection pool.
- name
pool name
- url
JDBC URL
- user
JDBC username
- password
JDBC password
- settings
Settings
- def apply(name: Any = DEFAULT_NAME): ConnectionPool
Returns Connection pool.
Returns Connection pool. If the specified Connection pool does not exist, throws IllegalStateException.
- name
pool name
- returns
connection pool
- Exceptions thrown
IllegalStateException
if the specified Connection pool does not exist
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def borrow(name: Any = DEFAULT_NAME): Connection
Borrows a java.sql.Connection from the specified connection pool.
Borrows a java.sql.Connection from the specified connection pool.
- name
pool name
- returns
connection
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def close(name: Any = DEFAULT_NAME): Unit
Close a pool by name
Close a pool by name
- name
pool name
- def closeAll(): Unit
Close all connection pools
- def dataSource(name: Any = DEFAULT_NAME): DataSource
Returns javax.sql.DataSource.
Returns javax.sql.DataSource.
- name
pool name
- returns
datasource
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def get(name: Any = DEFAULT_NAME): ConnectionPool
Returns Connection pool.
Returns Connection pool. If the specified Connection pool does not exist, throws IllegalStateException.
- name
pool name
- returns
connection pool
- Exceptions thrown
IllegalStateException
if the specified Connection pool does not exist
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def isInitialized(name: Any = DEFAULT_NAME): Boolean
Returns true when the specified Connection pool is already initialized.
Returns true when the specified Connection pool is already initialized.
- name
pool name
- returns
is initialized
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val log: Log
Logger
Logger
- Attributes
- protected
- Definition Classes
- LogSupport
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def singleton(dataSource: AuthenticatedDataSourceConnectionPool): Unit
Registers the default Connection pool.
Registers the default Connection pool.
- dataSource
DataSource
- def singleton(dataSource: DataSourceConnectionPool): Unit
Registers the default Connection pool.
Registers the default Connection pool.
- dataSource
DataSource
- def singleton(url: String, user: String, password: String, settings: CPSettings = ConnectionPoolSettings())(implicit factory: CPFactory = DEFAULT_CONNECTION_POOL_FACTORY): Unit
Registers the default Connection pool.
Registers the default Connection pool.
- url
JDBC URL
- user
JDBC username
- password
JDBC password
- settings
Settings
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)