类 MapJobRegistry
- java.lang.Object
- org.springframework.batch.core.configuration.support.MapJobRegistry
- 所有已实现的接口:
JobLocator
,JobRegistry
,ListableJobLocator
public class MapJobRegistry extends java.lang.Object implements JobRegistry
Simple, thread-safe, map-based implementation ofJobRegistry
.- 作者:
- Dave Syer, Robert Fischer, Mahmoud Ben Hassine
构造器概要
构造器 构造器 说明 MapJobRegistry()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Job
getJob(java.lang.String name)
Locates aJob
at runtime.java.util.Set<java.lang.String>
getJobNames()
Provides an unmodifiable view of the job names.void
register(JobFactory jobFactory)
Registers aJob
at runtime.void
unregister(java.lang.String name)
Unregisters a previously registeredJob
.
构造器详细资料
MapJobRegistry
public MapJobRegistry()
方法详细资料
register
public void register(JobFactory jobFactory) throws DuplicateJobException
从接口复制的说明:JobRegistry
Registers aJob
at runtime.- 指定者:
register
在接口中JobRegistry
- 参数:
jobFactory
- theJob
to be registered- 抛出:
DuplicateJobException
- if a factory with the same job name has already been registered.
unregister
public void unregister(java.lang.String name)
从接口复制的说明:JobRegistry
Unregisters a previously registeredJob
. If it was not previously registered there is no error.- 指定者:
unregister
在接口中JobRegistry
- 参数:
name
- theJob
to unregister.
getJob
public Job getJob(java.lang.String name) throws NoSuchJobException
从接口复制的说明:JobLocator
Locates aJob
at runtime.- 指定者:
getJob
在接口中JobLocator
- 参数:
name
- the name of theJob
which should be unique- 返回:
- a
Job
identified by the given name - 抛出:
NoSuchJobException
- if the required configuration can not be found.
getJobNames
public java.util.Set<java.lang.String> getJobNames()
Provides an unmodifiable view of the job names.- 指定者:
getJobNames
在接口中ListableJobLocator
- 返回:
- a collection of String. Empty if none are registered.