Class HikariCPServiceConfigurationLocalhostProvider
- java.lang.Object
-
- io.helidon.service.configuration.api.ServiceConfigurationProvider
-
- io.helidon.service.configuration.hikaricp.HikariCPServiceConfigurationProvider
-
- io.helidon.service.configuration.hikaricp.localhost.HikariCPServiceConfigurationLocalhostProvider
-
@Deprecated public class HikariCPServiceConfigurationLocalhostProvider extends HikariCPServiceConfigurationProvider
Deprecated.This class is slated for removal.
-
-
Constructor Summary
Constructors Constructor Description HikariCPServiceConfigurationLocalhostProvider()Deprecated.Creates a newHikariCPServiceConfigurationProvider.
-
Method Summary
-
Methods inherited from class io.helidon.service.configuration.hikaricp.HikariCPServiceConfigurationProvider
buildFor, getDataSourceProperty, getPrefix
-
Methods inherited from class io.helidon.service.configuration.api.ServiceConfigurationProvider
getAuthoritativeSystem, getServiceIdentifier
-
-
-
-
Constructor Detail
-
HikariCPServiceConfigurationLocalhostProvider
public HikariCPServiceConfigurationLocalhostProvider()
Deprecated.Creates a newHikariCPServiceConfigurationProvider.
-
-
Method Detail
-
create
protected HikariCPServiceConfiguration create(Properties properties, System system, Properties coordinates)
Deprecated.Overrides theHikariCPServiceConfigurationProvider.create(Properties, io.helidon.service.configuration.api.System, Properties)method to return a newHikariCPServiceConfigurationLocalhostinstance when invoked.This method never returns
null.Overrides of this method must not return
null.This method returns a new
HikariCPServiceConfigurationLocalhostinstance with each invocation.Overrides of this method must return a new
HikariCPServiceConfigurationimplementation of some kind.- Overrides:
createin classHikariCPServiceConfigurationProvider- Parameters:
properties- aPropertiesinstance that will be used as the basis of theHikariCPServiceConfigurationLocalhostimplementation that will be returned; must not benullsystem- aSystemdetermined to be in effect; may, strictly speaking, benullbut ordinarily is non-nulland enabledcoordinates- aPropertiesinstance representing the meta-properties in effect; may benull- Returns:
- a new
HikariCPServiceConfigurationLocalhostinstance; nevernull - Throws:
NullPointerException- ifpropertiesisnull- See Also:
HikariCPServiceConfiguration(Properties, io.helidon.service.configuration.api.System, Properties),HikariCPServiceConfigurationProvider.buildFor(Set, Properties),HikariCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties)
-
appliesTo
protected boolean appliesTo(Properties properties, System system, Properties coordinates)
Deprecated.Overrides theHikariCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties)method to returntrueif the suppliedSystemis enabled and an instance ofLocalhostSystemand if the HikariCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties) method returnstrue.- Overrides:
appliesToin classHikariCPServiceConfigurationProvider- Parameters:
properties- aPropertiesinstance that will be used as the basis of theHikariCPServiceConfigurationLocalhostimplementation that will be returned by thecreate(Properties, io.helidon.service.configuration.api.System, Properties)method; must not benullsystem- aSystemdetermined to be in effect; may, strictly speaking, benullbut ordinarily is non-nulland enabledcoordinates- aPropertiesinstance representing the meta-properties in effect; may benull- Returns:
trueif thisHikariCPServiceConfigurationLocalhostProviderapplies to the configuration space implied by the supplied parameters;falseotherwise- See Also:
HikariCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties)
-
installDataSourceProperties
protected void installDataSourceProperties(Properties target, System system, Properties coordinates, String dataSourceName)
Deprecated.Overrides theHikariCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)method to automatically create in-memory H2 databases as needed.Specifically, this method:
- Calls the
HikariCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)method with the supplied parameters. - Checks to see if a property named
javax.sql.DataSource.dataSourceName.explicitlyConfiguredhas aStringvalue equal to anything other thantrue, includingnull. - If so, then it sets certain properties on
targetas follows:javax.sql.DataSource.dataSourceName.dataSourceClassName = org.h2.jdbcx.JdbcDataSourcejavax.sql.DataSource.dataSourceName.dataSource.description = A local, transient, in-memory H2 databasejavax.sql.DataSource.dataSourceName.dataSource.user = sajavax.sql.DataSource.dataSourceName.dataSource.password =javax.sql.DataSource.dataSourceName.dataSourceUrl = jdbc:h2:mem:dataSourceName
- Overrides:
installDataSourcePropertiesin classHikariCPServiceConfigurationProvider- Parameters:
target- aPropertiesinstance that will be used as the basis of theHikariCPServiceConfigurationLocalhostimplementation that will be returned by thecreate(Properties, io.helidon.service.configuration.api.System, Properties)method and into which properties may be installed; must not benullsystem- aSystemdetermined to be in effect; may, strictly speaking, benullbut ordinarily is non-nulland enabledcoordinates- aPropertiesinstance representing the meta-properties in effect; may benulldataSourceName- the data source name in question; may benull- Throws:
NullPointerException- iftargetisnull- See Also:
HikariCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)
- Calls the
-
-