public class DistributedJobLocator
extends java.lang.Object
implements org.springframework.batch.core.configuration.ListableJobLocator
DistributedJobService
. This class also provides support methods
to work with batch jobs in a distributed environment.Constructor and Description |
---|
DistributedJobLocator() |
Modifier and Type | Method and Description |
---|---|
protected void |
addJob(java.lang.String name,
boolean incrementable,
boolean restartable)
Store the job name , job parameterer incrementable and job restartable
flags for the job when there is a registry update
|
protected void |
addStepNames(java.lang.String jobName,
java.util.Collection<java.lang.String> stepNames)
Add the collection of step names into XD_JOB_REGISTRY_STEP_NAMES for a given job.
|
protected void |
deleteAll()
Delete all the registry and step name entries.
|
protected void |
deleteJobRegistry(java.lang.String jobName)
Delete the job entry from the registry table.
|
java.util.Collection<java.lang.String> |
getAllRestartableJobs()
Get all the deployed job names that can be restarted.
|
org.springframework.jdbc.core.JdbcOperations |
getJdbcTemplate() |
org.springframework.batch.core.Job |
getJob(java.lang.String name)
Get simple batch job representation for the given job name.
|
java.util.Collection<java.lang.String> |
getJobNames()
Get all the deployed job names.
|
java.util.List<java.lang.String> |
getJobStepNames(java.lang.String jobName)
Get all the steps' names of a given job name.
|
java.lang.Boolean |
isIncrementable(java.lang.String jobName) |
java.lang.Boolean |
isRestartable(java.lang.String jobName) |
void |
setJdbcTemplate(org.springframework.jdbc.core.JdbcOperations jdbcTemplate) |
public java.util.Collection<java.lang.String> getJobNames()
getJobNames
in interface org.springframework.batch.core.configuration.ListableJobLocator
public java.util.Collection<java.lang.String> getAllRestartableJobs()
public org.springframework.batch.core.Job getJob(java.lang.String name) throws org.springframework.batch.core.launch.NoSuchJobException
getJob
in interface org.springframework.batch.core.configuration.JobLocator
name
- the job nameorg.springframework.batch.core.launch.NoSuchJobException
public java.util.List<java.lang.String> getJobStepNames(java.lang.String jobName)
jobName
- protected void addJob(java.lang.String name, boolean incrementable, boolean restartable)
name
- the job name to addincrementable
- flag to specify if the job parameter is incrementablerestartable
- flag to specify if the job is restartableprotected void addStepNames(java.lang.String jobName, java.util.Collection<java.lang.String> stepNames)
jobName
- the job namestepNames
- the collection of step names associated with this jobprotected void deleteJobRegistry(java.lang.String jobName)
jobName
- the job name.protected void deleteAll()
public java.lang.Boolean isIncrementable(java.lang.String jobName)
jobName
- the job namepublic java.lang.Boolean isRestartable(java.lang.String jobName)
jobName
- the job namepublic org.springframework.jdbc.core.JdbcOperations getJdbcTemplate()
public void setJdbcTemplate(org.springframework.jdbc.core.JdbcOperations jdbcTemplate)