JdbcPooledDataSourceFactory (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.connectors.jdbc, class: JdbcPooledDataSourceFactory

Package org.apache.geode.connectors.jdbc

# Class JdbcPooledDataSourceFactory

java.lang.Object
org.apache.geode.connectors.jdbc.JdbcPooledDataSourceFactory

All Implemented Interfaces:
  `PooledDataSourceFactory`

public class JdbcPooledDataSourceFactory extends Object implements PooledDataSourceFactory
This class implements PooledDataSourceFactory for the JDBC Connector extension. It will be used by default for a data-source with type "POOLED" specified when using the "gfsh create data-source" command.

The connection pooling is provided by Hikari, a high-performance JDBC connection pool.
The following data-source parameters will be will be passed to Hikari as the following:
connection-url --> jdbcUrl
jdbc-driver-class --> driverClassName
user-name --> username
password --> password
max-pool-size --> maximumPoolSize
idle-timeout-seconds --> idleTimeout

Additional Hikari configuration parameters may be passed to configure the Hikari pool by specifying them using the --pool-properties of the "gfsh create data-source" command.

For more information see the "gfsh create data-source" command.
Additional Hikari options are described at https://github.com/brettwooldridge/HikariCP#configuration-knobs-baby

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JdbcPooledDataSourceFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DataSource`
  `createDataSource(Properties poolProperties, Properties dataSourceProperties)`
  Create and return a data source configured with the given properties.

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

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

- ## Constructor Details

  - ### JdbcPooledDataSourceFactory

    public JdbcPooledDataSourceFactory()

- ## Method Details

  - ### createDataSource

    public DataSource createDataSource(Properties poolProperties, Properties dataSourceProperties)
    Description copied from interface: `PooledDataSourceFactory`
    Create and return a data source configured with the given properties.

    If you desire to have the data source release its resources when the cache is closed or the jndi-binding is removed, then also implement `AutoCloseable`.

    Specified by:
      `createDataSource` in interface `PooledDataSourceFactory`
    Parameters:
      `poolProperties` - properties to use to initialize the pool part of the data source The poolProperties names can be any of the following:
      connection-url, user-name, password, jdbc-driver-class, max-pool-size, init-pool-size, idle-timeout-seconds, login-timeout-seconds, or blocking-timeout-seconds.

      `dataSourceProperties` - properties to use to initialize the data source the pool will use to create connections

    Returns:
      the created data source