Class JobLauncherWithAdditionalRestartCapabilities
- java.lang.Object
-
- org.springframework.batch.core.launch.support.SimpleJobLauncher
-
- com.devonfw.module.batch.common.impl.JobLauncherWithAdditionalRestartCapabilities
-
- All Implemented Interfaces:
org.springframework.batch.core.launch.JobLauncher,org.springframework.beans.factory.InitializingBean
public class JobLauncherWithAdditionalRestartCapabilities extends org.springframework.batch.core.launch.support.SimpleJobLauncherJobLauncherthat extends the functionality provided by the standardSimpleJobLauncher:For batches, which always restart from scratch (i.e. those marked with restartable="false"), the parameter's are 'incremented' automatically using the
JobParametersIncrementerfrom 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.
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.batch.core.repository.JobRepositoryjobRepository
-
Constructor Summary
Constructors Constructor Description JobLauncherWithAdditionalRestartCapabilities()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.batch.core.JobExecutionrun(org.springframework.batch.core.Job job, org.springframework.batch.core.JobParameters jobParameters)voidsetJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
-
-
-
Method Detail
-
run
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- Specified by:
runin interfaceorg.springframework.batch.core.launch.JobLauncher- Overrides:
runin classorg.springframework.batch.core.launch.support.SimpleJobLauncher- Throws:
org.springframework.batch.core.repository.JobExecutionAlreadyRunningExceptionorg.springframework.batch.core.repository.JobRestartExceptionorg.springframework.batch.core.repository.JobInstanceAlreadyCompleteExceptionorg.springframework.batch.core.JobParametersInvalidException
-
setJobRepository
public void setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
- Overrides:
setJobRepositoryin classorg.springframework.batch.core.launch.support.SimpleJobLauncher
-
-