类 DefaultJobLoader
- java.lang.Object
- org.springframework.batch.core.configuration.support.DefaultJobLoader
- 所有已实现的接口:
JobLoader
,org.springframework.beans.factory.InitializingBean
public class DefaultJobLoader extends java.lang.Object implements JobLoader, org.springframework.beans.factory.InitializingBean
Default implementation ofJobLoader
. Uses aJobRegistry
to manage a population of loaded jobs and clears them up when asked. An optionalStepRegistry
might also be set to register the step(s) available for each registered job.- 作者:
- Dave Syer, Stephane Nicoll, Mahmoud Ben Hassine
构造器概要
构造器 构造器 说明 DefaultJobLoader()
Default constructor useful for declarative configuration.DefaultJobLoader(JobRegistry jobRegistry)
Creates a job loader with the job registry provided.DefaultJobLoader(JobRegistry jobRegistry, StepRegistry stepRegistry)
Creates a job loader with the job and step registries provided.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
void
clear()
Unregister all the jobs and close all the contexts created by this loader.java.util.Collection<Job>
load(ApplicationContextFactory factory)
Load an application context and register all the jobs.java.util.Collection<Job>
reload(ApplicationContextFactory factory)
Load an application context and register all the jobs, having first unregistered them if already registered.void
setJobRegistry(JobRegistry jobRegistry)
TheJobRegistry
to use for jobs created.void
setStepRegistry(StepRegistry stepRegistry)
TheStepRegistry
to use for the steps of created jobs.
构造器详细资料
DefaultJobLoader
public DefaultJobLoader()
Default constructor useful for declarative configuration.
DefaultJobLoader
public DefaultJobLoader(JobRegistry jobRegistry)
Creates a job loader with the job registry provided.- 参数:
jobRegistry
- aJobRegistry
DefaultJobLoader
public DefaultJobLoader(JobRegistry jobRegistry, @Nullable StepRegistry stepRegistry)
Creates a job loader with the job and step registries provided.- 参数:
jobRegistry
- aJobRegistry
stepRegistry
- aStepRegistry
(can benull
)
方法详细资料
setJobRegistry
public void setJobRegistry(JobRegistry jobRegistry)
TheJobRegistry
to use for jobs created.- 参数:
jobRegistry
- the job registry
setStepRegistry
public void setStepRegistry(StepRegistry stepRegistry)
TheStepRegistry
to use for the steps of created jobs.- 参数:
stepRegistry
- the step registry
clear
public void clear()
Unregister all the jobs and close all the contexts created by this loader.- 指定者:
clear
在接口中JobLoader
- 另请参阅:
JobLoader.clear()
reload
public java.util.Collection<Job> reload(ApplicationContextFactory factory)
从接口复制的说明:JobLoader
Load an application context and register all the jobs, having first unregistered them if already registered. Implementations should also take care to close and clean up the application context previously created if possible (either from this factory or from one with the same jobs).
load
public java.util.Collection<Job> load(ApplicationContextFactory factory) throws DuplicateJobException
从接口复制的说明:JobLoader
Load an application context and register all the jobs.- 指定者:
load
在接口中JobLoader
- 参数:
factory
- a factory for an application context (containing jobs)- 返回:
- a collection of the jobs created
- 抛出:
DuplicateJobException
- if a job with the same name was already registered
afterPropertiesSet
public void afterPropertiesSet()
- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean