@Beta public class JdbcDataStoreFactory extends Object implements ExternalDataStoreFactory<DataSource>
DataSource
.
Implementation is based on HikariDataSource
. ExternalDataStoreConfig.getProperties()
are passed directly
to HikariConfig
. For available options see
HikariCP configuration
Modifier and Type | Field and Description |
---|---|
protected ExternalDataStoreConfig |
config |
protected com.hazelcast.datastore.impl.CloseableDataSource |
sharedCloseableDataSource |
protected com.zaxxer.hikari.HikariDataSource |
sharedDataSource |
Constructor and Description |
---|
JdbcDataStoreFactory() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes underlying resources
|
protected com.zaxxer.hikari.HikariDataSource |
doCreateDataSource() |
DataSource |
getDataStore()
Returns configured data store.
|
void |
init(ExternalDataStoreConfig config)
Initialize factory with the config
|
protected com.zaxxer.hikari.HikariDataSource sharedDataSource
protected com.hazelcast.datastore.impl.CloseableDataSource sharedCloseableDataSource
protected ExternalDataStoreConfig config
public void init(ExternalDataStoreConfig config)
ExternalDataStoreFactory
init
in interface ExternalDataStoreFactory<DataSource>
config
- configuration of the given datastorepublic DataSource getDataStore()
ExternalDataStoreFactory
getDataStore
in interface ExternalDataStoreFactory<DataSource>
protected com.zaxxer.hikari.HikariDataSource doCreateDataSource()
public void close() throws Exception
ExternalDataStoreFactory
close
in interface ExternalDataStoreFactory<DataSource>
close
in interface AutoCloseable
Exception
Copyright © 2024 Hazelcast, Inc.. All rights reserved.