public interface DatabasePlatformSupport
DataSourceFactory
implementation to retrieve
the necessary configuration data for every database platform. As databases platform
have differences in the URL scheme, driver class name this interface provides an
abstraction to retrieve the information based on the particular database platform.
Normally this information is provided at configuration time by the user, because of the fact that Spring Cloud AWS creates the datasource at runtime, this information must be provided through a registry.
Modifier and Type | Method and Description |
---|---|
String |
getDatabaseUrlForDatabase(DatabaseType databaseType,
String hostname,
int port,
String databaseName)
Constructs the database URL for the database instance.
|
String |
getDriverClassNameForDatabase(DatabaseType databaseType)
Returns the fully qualified driver class name for the database platform.
|
String getDriverClassNameForDatabase(DatabaseType databaseType)
databaseType
- - The database type for which the database driver class should
be returned.String getDatabaseUrlForDatabase(DatabaseType databaseType, String hostname, int port, String databaseName)
databaseType
- - The databaseType for which the URL should be constructed.hostname
- - The hostname without any port information used to connect to.port
- - The port used to connect to the databasedatabaseName
- - The database name used to connect to. The usage is
implementation specific (e.g. for Oracle this is the SID)Copyright © 2022 Pivotal Software, Inc.. All rights reserved.