public abstract class AbstractResumableJob extends Object implements IJob
Convenience class separating normal execution from recovery. If the job
is starting clean, the startExecution
method will get invoked.
Else, provided that there is already progress on a starting job
and the job is incomplete (i.e. failure), the resumeExecution
method will be invoked.
Typical usage of this class might be when extra (or different) steps
need to be undertaken when resuming a job. Otherwise, there may be no
benefits to using this class over a straight implementation of
IJob
.
Constructor and Description |
---|
AbstractResumableJob()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(JobStatusUpdater statusUpdater,
JobSuite suite)
Executes this job.
|
protected abstract void |
resumeExecution(JobStatusUpdater statusUpdater,
JobSuite suite)
Resumes the execution of a job.
|
protected abstract void |
startExecution(JobStatusUpdater statusUpdater,
JobSuite suite)
Starts the execution of a job.
|
public void execute(JobStatusUpdater statusUpdater, JobSuite suite)
IJob
JobProgress
.protected abstract void startExecution(JobStatusUpdater statusUpdater, JobSuite suite)
statusUpdater
- job progresssuite
- job suiteprotected abstract void resumeExecution(JobStatusUpdater statusUpdater, JobSuite suite)
statusUpdater
- job progresssuite
- job suiteCopyright © 2007–2021 Norconex Inc.. All rights reserved.