Class SimpleJobServiceFactoryBean

java.lang.Object
org.springframework.cloud.dataflow.server.batch.SimpleJobServiceFactoryBean
All Implemented Interfaces:
Aware, FactoryBean<JobService>, InitializingBean, EnvironmentAware

public class SimpleJobServiceFactoryBean extends Object implements FactoryBean<JobService>, InitializingBean, EnvironmentAware
A factory for a JobService that makes the configuration of its various ingredients as convenient as possible.
Author:
Dave Syer, Corneil du Plessis
  • Constructor Details

    • SimpleJobServiceFactoryBean

      public SimpleJobServiceFactoryBean()
  • Method Details

    • setTransactionManager

      public void setTransactionManager(PlatformTransactionManager transactionManager)
    • setLobHandler

      public void setLobHandler(LobHandler lobHandler)
      A special handler for large objects. The default is usually fine, except for some (usually older) versions of Oracle. The default is determined from the data base type.
      Parameters:
      lobHandler - the LobHandler to set
      See Also:
    • setMaxVarCharLength

      public void setMaxVarCharLength(int maxVarCharLength)
      Public setter for the length of long string columns in database. Do not set this if you haven't modified the schema. Note this value will be used for the exit message in both JdbcJobExecutionDao and JdbcStepExecutionDao and also the short version of the execution context in JdbcExecutionContextDao . For databases with multi-byte character sets this number can be smaller (by up to a factor of 2 for 2-byte characters) than the declaration of the column length in the DDL for the tables.
      Parameters:
      maxVarCharLength - the exitMessageLength to set
    • setEnvironment

      public void setEnvironment(Environment environment)
      Specified by:
      setEnvironment in interface EnvironmentAware
    • setDataSource

      public void setDataSource(DataSource dataSource)
      Public setter for the DataSource.
      Parameters:
      dataSource - a DataSource
    • setDatabaseType

      public void setDatabaseType(String dbType)
      Sets the database type.
      Parameters:
      dbType - as specified by DefaultDataFieldMaxValueIncrementerFactory
    • setTablePrefix

      public void setTablePrefix(String tablePrefix)
      Sets the table prefix for all the batch meta-data tables.
      Parameters:
      tablePrefix - Prefix for batch meta-data tables
    • setTaskTablePrefix

      public void setTaskTablePrefix(String taskTablePrefix)
    • setJobService

      public void setJobService(JobService jobService)
      Sets the JobService for the factory bean.
      Parameters:
      jobService - the JobService for this Factory Bean.
    • setIncrementerFactory

      public void setIncrementerFactory(org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory incrementerFactory)
      A factory for incrementers (used to build primary keys for meta data). Defaults to DefaultDataFieldMaxValueIncrementerFactory.
      Parameters:
      incrementerFactory - the incrementer factory to set
    • setJobExplorer

      public void setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)
    • setJobRepository

      public void setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
      The repository used to store and update jobs and step executions.
      Parameters:
      jobRepository - the JobRepository to set
    • setJobLauncher

      public void setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
      The launcher used to run jobs.
      Parameters:
      jobLauncher - a JobLauncher
    • setSerializer

      public void setSerializer(org.springframework.batch.core.repository.ExecutionContextSerializer serializer)
      A custom implementation of the ExecutionContextSerializer.
      Parameters:
      serializer - the serializer to set
      See Also:
      • ExecutionContextSerializer
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface InitializingBean
      Throws:
      Exception
    • createJobInstanceDao

      protected SearchableJobInstanceDao createJobInstanceDao() throws Exception
      Throws:
      Exception
    • createJobExecutionDao

      protected SearchableJobExecutionDao createJobExecutionDao() throws Exception
      Throws:
      Exception
    • createStepExecutionDao

      protected SearchableStepExecutionDao createStepExecutionDao() throws Exception
      Throws:
      Exception
    • createExecutionContextDao

      protected org.springframework.batch.core.repository.dao.ExecutionContextDao createExecutionContextDao() throws Exception
      Throws:
      Exception
    • getObject

      public JobService getObject() throws Exception
      Create a SimpleJobService from the configuration provided.
      Specified by:
      getObject in interface FactoryBean<JobService>
      Throws:
      Exception
      See Also:
    • getObjectType

      public Class<? extends JobService> getObjectType()
      Tells the containing bean factory what kind of object is the product of getObject().
      Specified by:
      getObjectType in interface FactoryBean<JobService>
      Returns:
      SimpleJobService
      See Also:
    • isSingleton

      public boolean isSingleton()
      Allows optimisation in the containing bean factory.
      Specified by:
      isSingleton in interface FactoryBean<JobService>
      Returns:
      true
      See Also: