public class JobLauncher extends Object
JobLauncher to invoke jobs when
it is time to run them. It will do the necessary checks to make sure that the job runner
is registered, has the appropriate run mode, can reconstruct the job's parameter map, and
so on. If everything checks out, it calls the job runner's
runJob method and records the
the resulting RunDetails using
addRunDetails.| Modifier and Type | Field and Description |
|---|---|
protected Date |
firedAt |
protected JobId |
jobId |
protected static org.slf4j.Logger |
LOG |
protected RunMode |
schedulerRunMode |
protected AbstractSchedulerService |
schedulerService |
| Constructor and Description |
|---|
JobLauncher(AbstractSchedulerService schedulerService,
RunMode schedulerRunMode,
Date firedAt,
JobId jobId)
Creates a job launcher to handle the running of a scheduled job.
|
JobLauncher(AbstractSchedulerService schedulerService,
RunMode schedulerRunMode,
Date firedAt,
JobId jobId,
JobDetails jobDetails)
Creates a job launcher to handle the running of a scheduled job.
|
| Modifier and Type | Method and Description |
|---|---|
void |
launch()
Call this to validate the job, run it, and update its status.
|
String |
toString() |
protected static final org.slf4j.Logger LOG
protected final AbstractSchedulerService schedulerService
protected final RunMode schedulerRunMode
protected final Date firedAt
protected final JobId jobId
public JobLauncher(AbstractSchedulerService schedulerService, RunMode schedulerRunMode, @Nullable Date firedAt, JobId jobId)
schedulerService - the scheduler that is invoking the jobschedulerRunMode - the expected run mode for the jobs that this scheduler ownsfiredAt - the time that the job was started, if known; may be null, in which case the
current time is usedjobId - the job ID of the job to runpublic JobLauncher(AbstractSchedulerService schedulerService, RunMode schedulerRunMode, @Nullable Date firedAt, JobId jobId, @Nullable JobDetails jobDetails)
schedulerService - the scheduler that is invoking the jobschedulerRunMode - the expected run mode for the jobs that this scheduler ownsfiredAt - the time that the job was started, if known; may be null, in which case the
current time is usedjobId - the job ID of the job to runjobDetails - the already loaded job details, if they are availableCopyright © 2017 Atlassian. All rights reserved.