|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.admin.launch.JobLauncherSynchronizer
@ManagedResource public class JobLauncherSynchronizer
Wrapper for a JobLauncher that synchronizes jobs globally so that
only one execution of a given Job can be active at once.
| Constructor Summary | |
|---|---|
JobLauncherSynchronizer()
|
|
| Method Summary | |
|---|---|
void |
addJobName(String jobName)
A job name that will be synchronized. |
void |
afterPropertiesSet()
|
void |
checkJobBeforeLaunch(Job job)
|
void |
checkJobDuringLaunch(String jobName,
JobExecution jobExecution)
|
Set<String> |
getJobNames()
|
void |
removeJobName(String jobName)
Remove a job name from the list to synchronize. |
void |
setJobExplorer(JobExplorer jobExplorer)
The JobExplorer to use to inspect existing executions. |
void |
setJobNames(Set<String> jobNames)
Set of job names that will be synchronized. |
void |
setJobRepository(JobRepository jobRepository)
The JobRepository needed for updates to execution data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JobLauncherSynchronizer()
| Method Detail |
|---|
public void setJobExplorer(JobExplorer jobExplorer)
JobExplorer to use to inspect existing executions.
jobExplorer - a JobExplorerpublic void setJobRepository(JobRepository jobRepository)
JobRepository needed for updates to execution data.
jobRepository - a JobRepositorypublic void setJobNames(Set<String> jobNames)
jobNames - the job names@ManagedOperation public void addJobName(String jobName)
jobName - the job name@ManagedOperation public void removeJobName(String jobName)
jobName - the job name@ManagedAttribute public Set<String> getJobNames()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanException
public void checkJobBeforeLaunch(Job job)
throws JobExecutionAlreadyRunningException
JobExecutionAlreadyRunningException
public void checkJobDuringLaunch(String jobName,
JobExecution jobExecution)
throws JobExecutionAlreadyRunningException
JobExecutionAlreadyRunningException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||