Package org.apache.wayang.jdbc.platform
Class JdbcPlatformTemplate
- java.lang.Object
-
- org.apache.wayang.core.platform.Platform
-
- org.apache.wayang.jdbc.platform.JdbcPlatformTemplate
-
- Direct Known Subclasses:
GenericJdbcPlatform
,PostgresPlatform
,Sqlite3Platform
public abstract class JdbcPlatformTemplate extends Platform
Platform
implementation for a JDBC-accessible database.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
coresProperty
java.lang.String
cpuMhzProperty
java.lang.String
jdbcPasswordProperty
java.lang.String
jdbcUrlProperty
java.lang.String
jdbcUserProperty
-
Fields inherited from class org.apache.wayang.core.platform.Platform
jsonSerializer
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JdbcPlatformTemplate(java.lang.String platformName, java.lang.String configName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
configureDefaults(Configuration configuration)
Configure default settings for this instance, e.g., to be able to createLoadProfileToTimeConverter
s.DatabaseDescriptor
createDatabaseDescriptor(Configuration configuration)
Creates a newDatabaseDescriptor
for this instance and the givenConfiguration
.LoadProfileToTimeConverter
createLoadProfileToTimeConverter(Configuration configuration)
TimeToCostConverter
createTimeToCostConverter(Configuration configuration)
Creates aTimeToCostConverter
for this instance.java.sql.Connection
getConnection()
Executor.Factory
getExecutorFactory()
protected abstract java.lang.String
getJdbcDriverClassName()
Provide the name of the JDBC driverClass
for this instance.java.lang.String
getPlatformId()
Provide a unique identifier for this kind of platform.SqlQueryChannel.Descriptor
getSqlQueryChannelDescriptor()
Retrieve aSqlQueryChannel.Descriptor
for this instance.-
Methods inherited from class org.apache.wayang.core.platform.Platform
createExecutor, getConfigurationName, getInitializeMillis, getName, isSinglePlatformExecutionPossible, load, toString, warmUp
-
-
-
-
Field Detail
-
cpuMhzProperty
public final java.lang.String cpuMhzProperty
-
coresProperty
public final java.lang.String coresProperty
-
jdbcUrlProperty
public final java.lang.String jdbcUrlProperty
-
jdbcUserProperty
public final java.lang.String jdbcUserProperty
-
jdbcPasswordProperty
public final java.lang.String jdbcPasswordProperty
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection()
-
configureDefaults
public void configureDefaults(Configuration configuration)
Description copied from class:Platform
Configure default settings for this instance, e.g., to be able to createLoadProfileToTimeConverter
s.- Specified by:
configureDefaults
in classPlatform
- Parameters:
configuration
- that should be configured
-
getExecutorFactory
public Executor.Factory getExecutorFactory()
- Specified by:
getExecutorFactory
in classPlatform
-
createLoadProfileToTimeConverter
public LoadProfileToTimeConverter createLoadProfileToTimeConverter(Configuration configuration)
- Specified by:
createLoadProfileToTimeConverter
in classPlatform
- Returns:
- a default
LoadProfileToTimeConverter
-
createTimeToCostConverter
public TimeToCostConverter createTimeToCostConverter(Configuration configuration)
Description copied from class:Platform
Creates aTimeToCostConverter
for this instance.- Specified by:
createTimeToCostConverter
in classPlatform
- Parameters:
configuration
- configures theTimeToCostConverter
- Returns:
- the
TimeToCostConverter
-
getPlatformId
public java.lang.String getPlatformId()
Provide a unique identifier for this kind of platform. Should consist of alphanumerical characters only.- Returns:
- the platform ID
-
getJdbcDriverClassName
protected abstract java.lang.String getJdbcDriverClassName()
Provide the name of the JDBC driverClass
for this instance.- Returns:
- the driver
Class
name
-
getSqlQueryChannelDescriptor
public SqlQueryChannel.Descriptor getSqlQueryChannelDescriptor()
Retrieve aSqlQueryChannel.Descriptor
for this instance.- Returns:
- the
SqlQueryChannel.Descriptor
-
createDatabaseDescriptor
public DatabaseDescriptor createDatabaseDescriptor(Configuration configuration)
Creates a newDatabaseDescriptor
for this instance and the givenConfiguration
.- Parameters:
configuration
- provides configuration information for the result- Returns:
- the
DatabaseDescriptor
-
-