public abstract class JobManager
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
boolean |
activated |
protected IJob[] |
awaitingJobs |
protected boolean |
executing |
protected int |
jobEnd |
protected int |
jobStart |
protected java.lang.Thread |
processingThread |
protected Job |
progressJob |
static boolean |
VERBOSE |
| Constructor and Description |
|---|
JobManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateProcessing()
Invoked exactly once, in background, before starting processing any job
|
int |
awaitingJobsCount()
Answer the amount of awaiting jobs.
|
IJob |
currentJob()
Answers the first job in the queue, or null if there is no job available
Until the job has completed, the job manager will keep answering the same job.
|
void |
disable() |
void |
discardJobs(java.lang.String jobFamily)
Remove the index from cache for a given project.
|
void |
enable() |
protected boolean |
isJobWaiting(IJob request) |
protected void |
moveToNextJob()
Advance to the next available job, once the current one has been completed.
|
protected void |
notifyIdle(long idlingTime)
When idle, give chance to do something
|
boolean |
performConcurrentJob(IJob searchJob,
int waitingPolicy,
IProgressMonitor monitor)
This API is allowing to run one job in concurrence with background processing.
|
abstract java.lang.String |
processName() |
void |
request(IJob job) |
void |
reset()
Flush current state
|
void |
run()
Infinite loop performing resource indexing
|
void |
shutdown()
Stop background processing, and wait until the current job is completed before returning
|
java.lang.String |
toString() |
protected IJob[] awaitingJobs
protected int jobStart
protected int jobEnd
protected boolean executing
protected java.lang.Thread processingThread
protected Job progressJob
public static boolean VERBOSE
public boolean activated
public void activateProcessing()
public int awaitingJobsCount()
public IJob currentJob()
public void disable()
public void discardJobs(java.lang.String jobFamily)
public void enable()
protected boolean isJobWaiting(IJob request)
protected void moveToNextJob()
protected void notifyIdle(long idlingTime)
public boolean performConcurrentJob(IJob searchJob, int waitingPolicy, IProgressMonitor monitor)
public abstract java.lang.String processName()
public void request(IJob job)
public void reset()
public void run()
run in interface java.lang.Runnablepublic void shutdown()
public java.lang.String toString()
toString in class java.lang.Object