public final class JobSuite extends Object
Constructor and Description |
---|
JobSuite(IJob rootJob) |
JobSuite(IJob rootJob,
JobSuiteConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
accept(IJobStatusVisitor visitor) |
void |
accept(IJobVisitor visitor)
Accepts a job suite visitor.
|
void |
accept(IJobVisitor visitor,
Class<IJob> jobClassFilter)
Accepts a job suite visitor, filtering jobs and job progresses to
those of the same type as the specified job class instance.
|
boolean |
execute() |
boolean |
execute(boolean resumeIfIncomplete) |
JobSuiteConfig |
getConfig() |
static String |
getCurrentJobId()
Gets the job identifier representing the currently running job for the
current thread.
|
String |
getId() |
IJobStatus |
getJobStatus(IJob job) |
IJobStatus |
getJobStatus(String jobId) |
ILogManager |
getLogManager() |
IJob |
getRootJob() |
IJobStatus |
getStatus()
Gets the job status for the root job.
|
String |
getWorkdir() |
boolean |
runJob(IJob job) |
static void |
setCurrentJobId(String jobId)
Sets a job identifier as the currently running job for the
the current thread.
|
void |
stop() |
static void |
stop(File indexFile) |
public JobSuite(IJob rootJob)
public JobSuite(IJob rootJob, JobSuiteConfig config)
public IJob getRootJob()
public JobSuiteConfig getConfig()
public IJobStatus getStatus()
getJobStatus(getRootJob())
.public IJobStatus getJobStatus(IJob job)
public IJobStatus getJobStatus(String jobId)
public boolean execute()
public boolean execute(boolean resumeIfIncomplete)
public void accept(IJobStatusVisitor visitor)
public void accept(IJobVisitor visitor)
visitor
- job suite visitorpublic void accept(IJobVisitor visitor, Class<IJob> jobClassFilter)
visitor
- job suite visitorjobClassFilter
- type to filter jobs and job progressespublic static String getCurrentJobId()
null
if no job is currently
associated with the current threadpublic static void setCurrentJobId(String jobId)
jobId
- job identifierpublic String getId()
public String getWorkdir()
public ILogManager getLogManager()
public boolean runJob(IJob job)
public void stop() throws IOException
IOException
public static void stop(File indexFile) throws IOException
IOException
Copyright © 2007–2021 Norconex Inc.. All rights reserved.