public class JobLauncherWithAdditionalRestartCapabilities
extends org.springframework.batch.core.launch.support.SimpleJobLauncher
JobLauncher that extends the functionality provided by the standard SimpleJobLauncher:
For batches, which always restart from scratch (i.e. those marked with restartable="false"), the parameter's are
'incremented' automatically using the JobParametersIncrementer from the job (usually by adding or modifying
the 'run.id' parameter). It is actually just a convenience functionality so that the one starting batches does not
have to change the parameters manually.
| Modifier and Type | Field and Description |
|---|---|
private org.springframework.batch.core.repository.JobRepository |
jobRepository |
| Constructor and Description |
|---|
JobLauncherWithAdditionalRestartCapabilities() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.batch.core.JobExecution |
run(org.springframework.batch.core.Job job,
org.springframework.batch.core.JobParameters jobParameters) |
void |
setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository) |
private org.springframework.batch.core.repository.JobRepository jobRepository
public JobLauncherWithAdditionalRestartCapabilities()
public org.springframework.batch.core.JobExecution run(org.springframework.batch.core.Job job,
org.springframework.batch.core.JobParameters jobParameters)
throws org.springframework.batch.core.repository.JobExecutionAlreadyRunningException,
org.springframework.batch.core.repository.JobRestartException,
org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException,
org.springframework.batch.core.JobParametersInvalidException
run in interface org.springframework.batch.core.launch.JobLauncherrun in class org.springframework.batch.core.launch.support.SimpleJobLauncherorg.springframework.batch.core.repository.JobExecutionAlreadyRunningExceptionorg.springframework.batch.core.repository.JobRestartExceptionorg.springframework.batch.core.repository.JobInstanceAlreadyCompleteExceptionorg.springframework.batch.core.JobParametersInvalidExceptionpublic void setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
setJobRepository in class org.springframework.batch.core.launch.support.SimpleJobLauncherCopyright © 2014–2019 devon4j-Team. All rights reserved.