Interface IJob
- All Known Implementing Classes:
AddJrtToIndex
,BinaryContainer
,IndexAllProject
,IndexBinaryFolder
,IndexRequest
,PatternSearchJob
,SaveIndex
,SubTypeSearchJob
public interface IJob
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
static boolean
static boolean
static int
static int
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Answer true if the job belongs to a given family (tag)void
cancel()
Asks this job to cancel its execution.void
Ensures that this job is ready to run.boolean
execute(org.eclipse.core.runtime.IProgressMonitor progress)
Execute the current job, answer whether it was successful.Returns this job's familydefault boolean
Answers if we need some sleep after index write operations.
-
Field Details
-
ForceImmediate
static final int ForceImmediate- See Also:
- Constant Field Values
-
CancelIfNotReady
static final int CancelIfNotReady- See Also:
- Constant Field Values
-
WaitUntilReady
static final int WaitUntilReady- See Also:
- Constant Field Values
-
FAILED
static final boolean FAILED- See Also:
- Constant Field Values
-
COMPLETE
static final boolean COMPLETE- See Also:
- Constant Field Values
-
-
Method Details
-
belongsTo
Answer true if the job belongs to a given family (tag) -
cancel
void cancel()Asks this job to cancel its execution. The cancellation can take an undertermined amount of time. -
ensureReadyToRun
void ensureReadyToRun()Ensures that this job is ready to run. -
execute
boolean execute(org.eclipse.core.runtime.IProgressMonitor progress)Execute the current job, answer whether it was successful. -
getJobFamily
String getJobFamily()Returns this job's family -
waitNeeded
default boolean waitNeeded()Answers if we need some sleep after index write operations. Default implementation returnsfalse
.- Returns:
- true if the job manager should sleep a bit after this job is done to avoid IO tasks overloading OS (which could cause UI freezes etc).
-