类 AbstractJobRepositoryFactoryBean
- java.lang.Object
- org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean
- 所有已实现的接口:
org.springframework.beans.factory.FactoryBean<JobRepository>
,org.springframework.beans.factory.InitializingBean
public abstract class AbstractJobRepositoryFactoryBean extends java.lang.Object implements org.springframework.beans.factory.FactoryBean<JobRepository>, org.springframework.beans.factory.InitializingBean
AFactoryBean
that automates the creation of aSimpleJobRepository
. Declares abstract methods for providing DAO object implementations.- 作者:
- Ben Hale, Lucas Ward, Robert Kasanicky
- 另请参阅:
JobRepositoryFactoryBean
,MapJobRepositoryFactoryBean
构造器概要
构造器 构造器 说明 AbstractJobRepositoryFactoryBean()
方法概要
所有方法 实例方法 抽象方法 具体方法 已过时的方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
protected abstract ExecutionContextDao
createExecutionContextDao()
protected abstract JobExecutionDao
createJobExecutionDao()
protected abstract JobInstanceDao
createJobInstanceDao()
protected abstract StepExecutionDao
createStepExecutionDao()
JobRepository
getJobRepository()
已过时。usegetObject()
insteadJobRepository
getObject()
java.lang.Class<JobRepository>
getObjectType()
The type of object to be returned fromgetObject()
.org.springframework.transaction.PlatformTransactionManager
getTransactionManager()
The transaction manager used in this factory.boolean
isSingleton()
void
setIsolationLevelForCreate(java.lang.String isolationLevelForCreate)
public setter for the isolation level to be used for the transaction when job execution entities are initially created.void
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Public setter for thePlatformTransactionManager
.void
setValidateTransactionState(boolean validateTransactionState)
Flag to determine whether to check for an existing transaction when a JobExecution is created.
构造器详细资料
AbstractJobRepositoryFactoryBean
public AbstractJobRepositoryFactoryBean()
方法详细资料
createJobInstanceDao
protected abstract JobInstanceDao createJobInstanceDao() throws java.lang.Exception
- 返回:
- fully configured
JobInstanceDao
implementation. - 抛出:
java.lang.Exception
- thrown if error occurs creating JobInstanceDao.
createJobExecutionDao
protected abstract JobExecutionDao createJobExecutionDao() throws java.lang.Exception
- 返回:
- fully configured
JobExecutionDao
implementation. - 抛出:
java.lang.Exception
- thrown if error occurs creating JobExecutionDao.
createStepExecutionDao
protected abstract StepExecutionDao createStepExecutionDao() throws java.lang.Exception
- 返回:
- fully configured
StepExecutionDao
implementation. - 抛出:
java.lang.Exception
- thrown if error occurs creating StepExecutionDao.
createExecutionContextDao
protected abstract ExecutionContextDao createExecutionContextDao() throws java.lang.Exception
- 返回:
- fully configured
ExecutionContextDao
implementation. - 抛出:
java.lang.Exception
- thrown if error occurs creating ExecutionContextDao.
getObjectType
public java.lang.Class<JobRepository> getObjectType()
The type of object to be returned fromgetObject()
.- 指定者:
getObjectType
在接口中org.springframework.beans.factory.FactoryBean<JobRepository>
- 返回:
- JobRepository.class
- 另请参阅:
FactoryBean.getObjectType()
isSingleton
public boolean isSingleton()
- 指定者:
isSingleton
在接口中org.springframework.beans.factory.FactoryBean<JobRepository>
setValidateTransactionState
public void setValidateTransactionState(boolean validateTransactionState)
Flag to determine whether to check for an existing transaction when a JobExecution is created. Defaults to true because it is usually a mistake, and leads to problems with restartability and also to deadlocks in multi-threaded steps.- 参数:
validateTransactionState
- the flag to set
setIsolationLevelForCreate
public void setIsolationLevelForCreate(java.lang.String isolationLevelForCreate)
public setter for the isolation level to be used for the transaction when job execution entities are initially created. The default is ISOLATION_SERIALIZABLE, which prevents accidental concurrent execution of the same job (ISOLATION_REPEATABLE_READ would work as well).- 参数:
isolationLevelForCreate
- the isolation level name to set- 另请参阅:
SimpleJobRepository.createJobExecution(String, org.springframework.batch.core.JobParameters)
setTransactionManager
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Public setter for thePlatformTransactionManager
.- 参数:
transactionManager
- the transactionManager to set
getTransactionManager
public org.springframework.transaction.PlatformTransactionManager getTransactionManager()
The transaction manager used in this factory. Useful to inject into steps and jobs, to ensure that they are using the same instance.- 返回:
- the transactionManager
getJobRepository
@Deprecated public JobRepository getJobRepository() throws java.lang.Exception
已过时。usegetObject()
insteadConvenience method for clients to grab theJobRepository
without a cast.- 返回:
- the
JobRepository
fromgetObject()
- 抛出:
java.lang.Exception
- if the repository could not be created
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean
- 抛出:
java.lang.Exception
getObject
public JobRepository getObject() throws java.lang.Exception
- 指定者:
getObject
在接口中org.springframework.beans.factory.FactoryBean<JobRepository>
- 抛出:
java.lang.Exception