|
||||||||||
| 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(java.lang.String jobName)
A job name that will be synchronized. |
void |
afterPropertiesSet()
|
void |
checkJobBeforeLaunch(org.springframework.batch.core.Job job)
|
void |
checkJobDuringLaunch(java.lang.String jobName,
org.springframework.batch.core.JobExecution jobExecution)
|
java.util.Set<java.lang.String> |
getJobNames()
|
void |
removeJobName(java.lang.String jobName)
Remove a job name from the list to synchronize. |
void |
setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)
The JobExplorer to use to inspect existing executions. |
void |
setJobNames(java.util.Set<java.lang.String> jobNames)
Set of job names that will be synchronized. |
void |
setJobRepository(org.springframework.batch.core.repository.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(org.springframework.batch.core.explore.JobExplorer jobExplorer)
JobExplorer to use to inspect existing executions.
jobExplorer - a JobExplorerpublic void setJobRepository(org.springframework.batch.core.repository.JobRepository jobRepository)
JobRepository needed for updates to execution data.
jobRepository - a JobRepositorypublic void setJobNames(java.util.Set<java.lang.String> jobNames)
jobNames - the job names@ManagedOperation public void addJobName(java.lang.String jobName)
jobName - the job name@ManagedOperation public void removeJobName(java.lang.String jobName)
jobName - the job name@ManagedAttribute public java.util.Set<java.lang.String> getJobNames()
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exception
public void checkJobBeforeLaunch(org.springframework.batch.core.Job job)
throws org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
public void checkJobDuringLaunch(java.lang.String jobName,
org.springframework.batch.core.JobExecution jobExecution)
throws org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||