Class JdbcPooledDataSourceFactory
- All Implemented Interfaces:
PooledDataSourceFactory
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 -
Method Summary
Modifier and TypeMethodDescriptioncreateDataSource(Properties poolProperties, Properties dataSourceProperties) Create and return a data source configured with the given properties.
-
Constructor Details
-
JdbcPooledDataSourceFactory
public JdbcPooledDataSourceFactory()
-
-
Method Details
-
createDataSource
Description copied from interface:PooledDataSourceFactoryCreate 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:
createDataSourcein interfacePooledDataSourceFactory- 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
-