public class SimpleJobServiceFactoryBean extends Object implements FactoryBean<JobService>, InitializingBean, EnvironmentAware
JobService
that makes the configuration of its various
ingredients as convenient as possible.OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
SimpleJobServiceFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected AggregateJobQueryDao |
createAggregateJobQueryDao() |
protected org.springframework.batch.core.repository.dao.ExecutionContextDao |
createExecutionContextDao() |
protected SearchableJobExecutionDao |
createJobExecutionDao() |
protected SearchableJobInstanceDao |
createJobInstanceDao() |
protected SearchableStepExecutionDao |
createStepExecutionDao() |
JobService |
getObject()
Create a
SimpleJobService from the configuration provided. |
Class<? extends JobService> |
getObjectType()
Tells the containing bean factory what kind of object is the product of
getObject() . |
boolean |
isSingleton()
Allows optimisation in the containing bean factory.
|
void |
setAppBootSchemaVersionTarget(org.springframework.cloud.dataflow.schema.SchemaVersionTarget schemaVersionTarget)
Set the schemaVersionTarget to be used by the created SimpleJobService.
|
void |
setDatabaseType(String dbType)
Sets the database type.
|
void |
setDataSource(DataSource dataSource)
Public setter for the
DataSource . |
void |
setEnvironment(Environment environment) |
void |
setIncrementerFactory(org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory incrementerFactory)
A factory for incrementers (used to build primary keys for meta data).
|
void |
setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer) |
void |
setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
The launcher used to run jobs.
|
void |
setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
The repository used to store and update jobs and step executions.
|
void |
setJobServiceContainer(JobServiceContainer jobServiceContainer)
Sets the
JobServiceContainer for the service. |
void |
setLobHandler(LobHandler lobHandler)
A special handler for large objects.
|
void |
setMaxVarCharLength(int maxVarCharLength)
Public setter for the length of long string columns in database.
|
void |
setSchemaService(org.springframework.cloud.dataflow.schema.service.SchemaService schemaService)
Sets the
SchemaService for this factory bean. |
void |
setSerializer(org.springframework.batch.core.repository.ExecutionContextSerializer serializer)
A custom implementation of the
ExecutionContextSerializer . |
void |
setTablePrefix(String tablePrefix)
Sets the table prefix for all the batch meta-data tables.
|
void |
setTransactionManager(PlatformTransactionManager transactionManager) |
public void setTransactionManager(PlatformTransactionManager transactionManager)
public void setAppBootSchemaVersionTarget(org.springframework.cloud.dataflow.schema.SchemaVersionTarget schemaVersionTarget)
schemaVersionTarget
- the schemaVersionTarget to be associated with this service.public void setLobHandler(LobHandler lobHandler)
lobHandler
- the LobHandler
to setLobHandler
public void setMaxVarCharLength(int maxVarCharLength)
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.maxVarCharLength
- the exitMessageLength to setpublic void setEnvironment(Environment environment)
setEnvironment
in interface EnvironmentAware
public void setDataSource(DataSource dataSource)
DataSource
.dataSource
- a DataSource
public void setDatabaseType(String dbType)
dbType
- as specified by DefaultDataFieldMaxValueIncrementerFactory
public void setTablePrefix(String tablePrefix)
tablePrefix
- Prefix for batch meta-data tablespublic void setJobServiceContainer(JobServiceContainer jobServiceContainer)
JobServiceContainer
for the service.jobServiceContainer
- the JobServiceContainer for this service.public void setSchemaService(org.springframework.cloud.dataflow.schema.service.SchemaService schemaService)
SchemaService
for this factory bean.schemaService
- the schemaService for this factory bean.public void setIncrementerFactory(org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory incrementerFactory)
DefaultDataFieldMaxValueIncrementerFactory
.incrementerFactory
- the incrementer factory to setpublic void setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)
public void setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
jobRepository
- the JobRepository
to setpublic void setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
jobLauncher
- a JobLauncher
public void setSerializer(org.springframework.batch.core.repository.ExecutionContextSerializer serializer)
ExecutionContextSerializer
.serializer
- the serializer to setExecutionContextSerializer
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected SearchableJobInstanceDao createJobInstanceDao() throws Exception
Exception
protected SearchableJobExecutionDao createJobExecutionDao() throws Exception
Exception
protected SearchableStepExecutionDao createStepExecutionDao() throws Exception
Exception
protected org.springframework.batch.core.repository.dao.ExecutionContextDao createExecutionContextDao() throws Exception
Exception
protected AggregateJobQueryDao createAggregateJobQueryDao() throws Exception
Exception
public JobService getObject() throws Exception
SimpleJobService
from the configuration provided.getObject
in interface FactoryBean<JobService>
Exception
FactoryBean.getObject()
public Class<? extends JobService> getObjectType()
getObject()
.getObjectType
in interface FactoryBean<JobService>
FactoryBean.getObjectType()
public boolean isSingleton()
isSingleton
in interface FactoryBean<JobService>
FactoryBean.isSingleton()
Copyright © 2024 Pivotal Software, Inc.. All rights reserved.