public class FulltextUpdaterWork extends PrioritizedWork
SessionImpl.getFulltextSimpleWork(java.util.Set<java.io.Serializable>)
or through
FulltextExtractorWork
) into the fulltext table.
This is done single-threaded through the use of a WorkManager
queue
with only one thread.
Priority is used to update "simpletext" before "binarytext".
Modifier and Type | Class and Description |
---|---|
static class |
FulltextUpdaterWork.FulltextUpdaterInfo
Info about what should be updated in a fulltext index.
|
Work.Progress, Work.State
Constructor and Description |
---|
FulltextUpdaterWork(boolean simpletext,
String repositoryName,
Collection<FulltextUpdaterWork.FulltextUpdaterInfo> infos) |
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. |
compareTo, equals, hashCode
afterRun, awaitTermination, beforeRun, getCompletionTime, getData, getPrincipal, getProgress, getSchedulingTime, getStartTime, getState, getStatus, initSession, run, setCanceled, setData, suspend, toString
public FulltextUpdaterWork(boolean simpletext, String repositoryName, Collection<FulltextUpdaterWork.FulltextUpdaterInfo> infos)
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.