public class FulltextExtractorWork extends AbstractWork
The extracted fulltext is then passed to the single-threaded
FulltextUpdaterWork
.
Work.Progress, Work.State
Constructor and Description |
---|
FulltextExtractorWork(String repositoryName,
Set<String> ids) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp(boolean ok,
Exception e)
This method is called after
AbstractWork.work() is done in a finally block,
whether work completed normally or was in error or was interrupted. |
String |
getCategory()
Gets the category for this work.
|
Collection<DocumentLocation> |
getDocuments()
Gets the documents impacted by the work.
|
String |
getTitle()
Gets a human-readable name for this work instance.
|
void |
work()
This method should implement the actual work done by the
Work
instance. |
afterRun, awaitTermination, beforeRun, getCompletionTime, getData, getPrincipal, getProgress, getSchedulingTime, getStartTime, getState, getStatus, initSession, run, setCanceled, setData, suspend, toString
public String getCategory()
Work
Used to choose a thread pool queue.
getCategory
in interface Work
getCategory
in class AbstractWork
null
for the defaultpublic String getTitle()
Work
public Collection<DocumentLocation> getDocuments()
Work
This is informative only.
getDocuments
in interface Work
getDocuments
in class AbstractWork
public void work() throws Exception
AbstractWork
Work
instance.
It should periodically call #setProgress()
to report its
progress.
To allow for suspension by the WorkManager
, it should
periodically call AbstractWork.isSuspending()
, and if true call
#suspended()
with saved state data and return early.
work
in class AbstractWork
Exception
public void cleanUp(boolean ok, Exception e)
AbstractWork
AbstractWork.work()
is done in a finally block,
whether work completed normally or was in error or was interrupted.cleanUp
in class AbstractWork
ok
- true
if the work completed normallye
- the exception, if availableCopyright © 2013 Nuxeo SA. All Rights Reserved.