Package org.apache.cayenne.datasource

# Class PoolingDataSourceBuilder

java.lang.Object
org.apache.cayenne.datasource.PoolingDataSourceBuilder

public class PoolingDataSourceBuilder extends Object
Turns unpooled DataSource to a connection pool. Normally you won't be creating this builder explicitly. Call `DataSourceBuilder.pool(int, int)` method instead.

Since:
  4.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PoolingDataSourceBuilder(DataSourceBuilder nonPoolingBuilder)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PoolingDataSource`
  `build()`
  Builds a pooling DataSource that needs to be explicitly closed by the caller when no longer in use.
  `PoolingDataSourceBuilder`
  `maxConnections(int maxConnections)`
  `PoolingDataSourceBuilder`
  `maxQueueWaitTime(long maxQueueWaitTime)`
  `PoolingDataSourceBuilder`
  `minConnections(int minConnections)`
  `PoolingDataSourceBuilder`
  `validationQuery(String validationQuery)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PoolingDataSourceBuilder

    public PoolingDataSourceBuilder(DataSourceBuilder nonPoolingBuilder)

- ## Method Details

  - ### minConnections

    public PoolingDataSourceBuilder minConnections(int minConnections)

  - ### maxConnections

    public PoolingDataSourceBuilder maxConnections(int maxConnections)

  - ### maxQueueWaitTime

    public PoolingDataSourceBuilder maxQueueWaitTime(long maxQueueWaitTime)

  - ### validationQuery

    public PoolingDataSourceBuilder validationQuery(String validationQuery)

  - ### build

    public PoolingDataSource build()
    Builds a pooling DataSource that needs to be explicitly closed by the caller when no longer in use.