Class RebuildChangeDocumentsIndexTask
- java.lang.Object
 - 
- com.atlassian.confluence.internal.search.tasks.RebuildChangeDocumentsIndexTask
 
 
- 
- All Implemented Interfaces:
 ConfluenceIndexTask,ConvertibleToJournalEntry,HandleAware,IndexTask
@LuceneIndependent @Internal public class RebuildChangeDocumentsIndexTask extends Object implements ConfluenceIndexTask, HandleAware
Responsible for rebuilding all change document(s) for a searchable (removing change documents for all versions of the searchable and then adding them back). 
- 
- 
Constructor Summary
Constructors Constructor Description RebuildChangeDocumentsIndexTask(Searchable searchable, ContentEntityObjectDao<ContentEntityObject> contentEntityObjectDao, IndexTaskFactoryInternal indexTaskFactory, HibernateSessionManager5 hibernateSessionManager, org.hibernate.SessionFactory sessionFactory, boolean skipDeletes)Constructs a rebuild change document index task. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<JournalEntry>convertToJournalEntry(JournalIdentifier journalId)Convert to journal entry.booleanequals(Object obj)StringgetDescription()A description of the task that can be presented to the user via the UI.HandlegetHandle()SearchIndexgetSearchIndex()inthashCode()voidperform(SearchIndexWriter writer)Executes this task against a document writer. 
 - 
 
- 
- 
Constructor Detail
- 
RebuildChangeDocumentsIndexTask
public RebuildChangeDocumentsIndexTask(Searchable searchable, ContentEntityObjectDao<ContentEntityObject> contentEntityObjectDao, IndexTaskFactoryInternal indexTaskFactory, HibernateSessionManager5 hibernateSessionManager, org.hibernate.SessionFactory sessionFactory, boolean skipDeletes)
Constructs a rebuild change document index task.- Parameters:
 searchable-contentEntityObjectDao-indexTaskFactory-hibernateSessionManager-sessionFactory-skipDeletes- flag to skip any deletions performed. Used during reindexing when deletion occurs at the start.- Throws:
 IllegalArgumentException- if searchable is null, failsChangeDocumentIndexPolicy.buildFor(Searchable)or is not the latest version.
 
 - 
 
- 
Method Detail
- 
getHandle
public Handle getHandle()
- Specified by:
 getHandlein interfaceHandleAware- Returns:
 - the handle
 
 
- 
getDescription
public String getDescription()
Description copied from interface:IndexTaskA description of the task that can be presented to the user via the UI.- Specified by:
 getDescriptionin interfaceIndexTask- Returns:
 - an readable message.
 
 
- 
perform
public void perform(SearchIndexWriter writer) throws IOException
Description copied from interface:ConfluenceIndexTaskExecutes this task against a document writer.- Specified by:
 performin interfaceConfluenceIndexTask- Throws:
 IOException
 
- 
convertToJournalEntry
public Optional<JournalEntry> convertToJournalEntry(JournalIdentifier journalId)
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.
 
 
- 
getSearchIndex
public SearchIndex getSearchIndex()
- Specified by:
 getSearchIndexin interfaceConfluenceIndexTask- Returns:
 - the 
SearchIndexthat the task should write to 
 
 - 
 
 -