public class HikariCPServiceConfigurationLocalhostProvider extends HikariCPServiceConfigurationProvider
| Constructor and Description |
|---|
HikariCPServiceConfigurationLocalhostProvider()
Creates a new
HikariCPServiceConfigurationProvider. |
buildFor, getDataSourceProperty, getPrefixgetAuthoritativeSystem, getServiceIdentifierpublic HikariCPServiceConfigurationLocalhostProvider()
HikariCPServiceConfigurationProvider.protected HikariCPServiceConfiguration create(Properties properties, System system, Properties coordinates)
HikariCPServiceConfigurationProvider.create(Properties, System,
Properties) method to return a new HikariCPServiceConfigurationLocalhost instance when invoked.
This method never returns null.
Overrides of this method must not return null.
This method returns a new HikariCPServiceConfigurationLocalhost instance with each
invocation.
Overrides of this method must return a new HikariCPServiceConfiguration implementation of some kind.
create in class HikariCPServiceConfigurationProviderproperties - a Properties instance that will be used
as the basis of the HikariCPServiceConfigurationLocalhost
implementation that will be returned; must not be nullsystem - a System determined to be in effect; may,
strictly speaking, be null but ordinarily is non-null and enabledcoordinates - a Properties instance representing the
meta-properties in effect; may be nullHikariCPServiceConfigurationLocalhost
instance; never nullNullPointerException - if properties is nullHikariCPServiceConfiguration(Properties,
System, Properties),
HikariCPServiceConfigurationProvider.buildFor(Set, Properties),
HikariCPServiceConfigurationProvider.appliesTo(Properties, System, Properties)protected boolean appliesTo(Properties properties, System system, Properties coordinates)
HikariCPServiceConfigurationProvider.appliesTo(Properties,
System, Properties) method to return true if the
supplied System is enabled and an instance of LocalhostSystem and if the
HikariCPServiceConfigurationProvider.appliesTo(Properties,
System, Properties) method returns true.appliesTo in class HikariCPServiceConfigurationProviderproperties - a Properties instance that will be used
as the basis of the HikariCPServiceConfigurationLocalhost
implementation that will be returned by the create(Properties, System, Properties) method; must not be
nullsystem - a System determined to be in effect; may,
strictly speaking, be null but ordinarily is non-null and enabledcoordinates - a Properties instance representing the
meta-properties in effect; may be nulltrue if this HikariCPServiceConfigurationLocalhostProvider applies to the
configuration space implied by the supplied parameters; false otherwiseHikariCPServiceConfigurationProvider.appliesTo(Properties,
System, Properties)protected void installDataSourceProperties(Properties target, System system, Properties coordinates, String dataSourceName)
HikariCPServiceConfigurationProvider.installDataSourceProperties(Properties,
System, Properties, String) method to automatically create in-memory
H2 databases as needed.
Specifically, this method:
HikariCPServiceConfigurationProvider.installDataSourceProperties(Properties,
System, Properties, String) method with the supplied
parameters.javax.sql.DataSource.dataSourceName.explicitlyConfigured has a String value equal to
anything other than true, including null.target as
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:dataSourceNameinstallDataSourceProperties in class HikariCPServiceConfigurationProvidertarget - a Properties instance that will be used as
the basis of the HikariCPServiceConfigurationLocalhost
implementation that will be returned by the create(Properties, System, Properties) method and into which
properties may be installed; must not be nullsystem - a System determined to be in effect; may,
strictly speaking, be null but ordinarily is non-null and enabledcoordinates - a Properties instance representing the
meta-properties in effect; may be nulldataSourceName - the data source name in question; may be
nullNullPointerException - if target is nullHikariCPServiceConfigurationProvider.installDataSourceProperties(Properties,
System, Properties, String)Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.