Packages

object ConnectionPool extends LogSupport

Connection Pool

The default implementation uses Commons DBCP 2 internally.

Source
ConnectionPool.scala
See also

https://commons.apache.org/proper/commons-dbcp/

Linear Supertypes
LogSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConnectionPool
  2. LogSupport
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type CPFactory = ConnectionPoolFactory
  2. type CPSettings = ConnectionPoolSettings
  3. type MutableMap[A, B] = HashMap[A, B]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val DEFAULT_CONNECTION_POOL_FACTORY: Commons2ConnectionPoolFactory.type
  5. val DEFAULT_NAME: String
  6. def add(name: Any, dataSource: AuthenticatedDataSourceConnectionPool): Unit

    Registers new named Connection pool.

    Registers new named Connection pool.

    name

    pool name

    dataSource

    DataSource based ConnectionPool

  7. def add(name: Any, dataSource: DataSourceConnectionPool): Unit

    Registers new named Connection pool.

    Registers new named Connection pool.

    name

    pool name

    dataSource

    DataSource based ConnectionPool

  8. 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

  9. 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

  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. 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

  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  13. def close(name: Any = DEFAULT_NAME): Unit

    Close a pool by name

    Close a pool by name

    name

    pool name

  14. def closeAll(): Unit

    Close all connection pools

  15. def dataSource(name: Any = DEFAULT_NAME): DataSource

    Returns javax.sql.DataSource.

    Returns javax.sql.DataSource.

    name

    pool name

    returns

    datasource

  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. 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

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  21. 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

  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. val log: Log

    Logger

    Logger

    Attributes
    protected
    Definition Classes
    LogSupport
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  27. def singleton(dataSource: AuthenticatedDataSourceConnectionPool): Unit

    Registers the default Connection pool.

    Registers the default Connection pool.

    dataSource

    DataSource

  28. def singleton(dataSource: DataSourceConnectionPool): Unit

    Registers the default Connection pool.

    Registers the default Connection pool.

    dataSource

    DataSource

  29. 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

  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from LogSupport

Inherited from AnyRef

Inherited from Any

Ungrouped