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
Platformimplementation for a JDBC-accessible database.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringcoresPropertyjava.lang.StringcpuMhzPropertyjava.lang.StringjdbcPasswordPropertyjava.lang.StringjdbcUrlPropertyjava.lang.StringjdbcUserProperty-
Fields inherited from class org.apache.wayang.core.platform.Platform
jsonSerializer
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJdbcPlatformTemplate(java.lang.String platformName, java.lang.String configName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidconfigureDefaults(Configuration configuration)Configure default settings for this instance, e.g., to be able to createLoadProfileToTimeConverters.DatabaseDescriptorcreateDatabaseDescriptor(Configuration configuration)Creates a newDatabaseDescriptorfor this instance and the givenConfiguration.LoadProfileToTimeConvertercreateLoadProfileToTimeConverter(Configuration configuration)TimeToCostConvertercreateTimeToCostConverter(Configuration configuration)Creates aTimeToCostConverterfor this instance.java.sql.ConnectiongetConnection()Executor.FactorygetExecutorFactory()protected abstract java.lang.StringgetJdbcDriverClassName()Provide the name of the JDBC driverClassfor this instance.java.lang.StringgetPlatformId()Provide a unique identifier for this kind of platform.SqlQueryChannel.DescriptorgetSqlQueryChannelDescriptor()Retrieve aSqlQueryChannel.Descriptorfor 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:PlatformConfigure default settings for this instance, e.g., to be able to createLoadProfileToTimeConverters.- Specified by:
configureDefaultsin classPlatform- Parameters:
configuration- that should be configured
-
getExecutorFactory
public Executor.Factory getExecutorFactory()
- Specified by:
getExecutorFactoryin classPlatform
-
createLoadProfileToTimeConverter
public LoadProfileToTimeConverter createLoadProfileToTimeConverter(Configuration configuration)
- Specified by:
createLoadProfileToTimeConverterin classPlatform- Returns:
- a default
LoadProfileToTimeConverter
-
createTimeToCostConverter
public TimeToCostConverter createTimeToCostConverter(Configuration configuration)
Description copied from class:PlatformCreates aTimeToCostConverterfor this instance.- Specified by:
createTimeToCostConverterin 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 driverClassfor this instance.- Returns:
- the driver
Classname
-
getSqlQueryChannelDescriptor
public SqlQueryChannel.Descriptor getSqlQueryChannelDescriptor()
Retrieve aSqlQueryChannel.Descriptorfor this instance.- Returns:
- the
SqlQueryChannel.Descriptor
-
createDatabaseDescriptor
public DatabaseDescriptor createDatabaseDescriptor(Configuration configuration)
Creates a newDatabaseDescriptorfor this instance and the givenConfiguration.- Parameters:
configuration- provides configuration information for the result- Returns:
- the
DatabaseDescriptor
-
-