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 and Description
    `PoolingDataSourceBuilder(DataSourceBuilder nonPoolingBuilder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### PoolingDataSourceBuilder

          public PoolingDataSourceBuilder(DataSourceBuilder nonPoolingBuilder)

  - ### Method Detail

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

Copyright © 2001–2018 Apache Cayenne. All rights reserved.