Class AddDocumentIndexTask
java.lang.Object
com.atlassian.confluence.internal.search.tasks.AddDocumentIndexTask
- All Implemented Interfaces:
ConfluenceIndexTask,ConvertibleToJournalEntry,HandleAware,IndexTask
- Direct Known Subclasses:
AddPrefetchedDocumentIndexTask
@LuceneIndependent
@Internal
public class AddDocumentIndexTask
extends Object
implements ConfluenceIndexTask, HandleAware
Adds a searchable to the content index.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AtlassianDocumentBuilder<Searchable>protected final HibernateHandleprotected final Searchable -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAddDocumentIndexTask(Searchable searchable) AddDocumentIndexTask(Searchable searchable, AtlassianDocumentBuilder<Searchable> documentBuilder) -
Method Summary
Modifier and TypeMethodDescriptionconvertToJournalEntry(JournalIdentifier journalId) Convert to journal entry.booleanA human readable description of this index task.inthashCode()booleanvoidperform(SearchIndexWriter writer) Executes this task against a document writer.
-
Field Details
-
documentBuilder
-
searchable
-
handle
-
-
Constructor Details
-
AddDocumentIndexTask
-
AddDocumentIndexTask
public AddDocumentIndexTask(Searchable searchable, AtlassianDocumentBuilder<Searchable> documentBuilder)
-
-
Method Details
-
perform
Description copied from interface:ConfluenceIndexTaskExecutes this task against a document writer.- Specified by:
performin interfaceConfluenceIndexTask- Throws:
IOException
-
isRetryable
public boolean isRetryable()- Specified by:
isRetryablein interfaceConfluenceIndexTask- Returns:
trueif this task is retryable in journal queue,falseotherwise.
-
convertToJournalEntry
Description copied from interface:ConvertibleToJournalEntryConvert to journal entry.- Specified by:
convertToJournalEntryin interfaceConvertibleToJournalEntry- Parameters:
journalId- journal identifier- Returns:
- an optional containing a journal entry or empty if this cannot be converted.
-
getDescription
A human readable description of this index task.- Specified by:
getDescriptionin interfaceIndexTask- Returns:
- an readable message.
-
equals
-
hashCode
public int hashCode() -
getHandle
- Specified by:
getHandlein interfaceHandleAware- Returns:
- the handle
-
getSearchIndex
- Specified by:
getSearchIndexin interfaceConfluenceIndexTask- Returns:
- the
SearchIndexthat the task should write to
-