Class DefaultIndexTaskFactory
java.lang.Object
com.atlassian.confluence.internal.search.tasks.DefaultIndexTaskFactory
- All Implemented Interfaces:
IndexTaskFactoryInternal
,IndexTaskFactory
@LuceneIndependent
@Internal
public class DefaultIndexTaskFactory
extends Object
implements IndexTaskFactoryInternal
Creates index tasks and provides conversion into queue entries for implementations of IndexTaskQueue
-
Constructor Summary
ConstructorDescriptionDefaultIndexTaskFactory
(BatchOperationManager batchOperationManager, AtlassianDocumentBuilder<Searchable> documentBuilder, AtlassianDocumentBuilder<Searchable> changeDocumentBuilder, ContentEntityObjectDaoInternal contentEntityObjectDao, PersonalInformationManager personalInformationManager, UserAccessor userAccessor, PersonalInformationDao personalInformationDao, SpaceDao spaceDao, PageManagerInternal pageManager, HibernateSessionManager5 hibernateSessionManager, com.atlassian.config.internal.ApplicationConfig applicationConfig) -
Method Summary
Modifier and TypeMethodDescriptioncreateAddChangeDocumentTask
(Searchable searchable) Constructs an add change document task.createAddDocumentTask
(Searchable searchable) NOTE: Do not call this method without first callingcreateDeleteDocumentTask(Searchable)
for the same object.createContentIndexTask
(List<ContentType> contentTypes, List<ContentStatus> contentStatuses, JournalEntryType journalEntryType) createDeleteChangeDocumentsIndexTask
(Searchable searchable) createDeleteDocumentTask
(Searchable searchable) createDeleteDocumentTask
(String handle) createRebuildChangeDocumentsIndexTask
(Searchable searchable) createReindexUsersInGroupChangeTask
(String groupName) createReindexUsersInGroupContentTask
(String groupName) createUnindexContentTypeChangeTask
(String contentType) createUnindexContentTypeContentTask
(String contentType) createUpdateDocumentTask
(Searchable searchable) Returns an update document task.createUpdateDocumentTask
(Searchable searchable, boolean includeDependents)
-
Constructor Details
-
DefaultIndexTaskFactory
public DefaultIndexTaskFactory(BatchOperationManager batchOperationManager, AtlassianDocumentBuilder<Searchable> documentBuilder, AtlassianDocumentBuilder<Searchable> changeDocumentBuilder, ContentEntityObjectDaoInternal contentEntityObjectDao, PersonalInformationManager personalInformationManager, UserAccessor userAccessor, PersonalInformationDao personalInformationDao, SpaceDao spaceDao, PageManagerInternal pageManager, HibernateSessionManager5 hibernateSessionManager, com.atlassian.config.internal.ApplicationConfig applicationConfig) - Since:
- 8.0
-
-
Method Details
-
createContentIndexTask
public ContentIndexTask createContentIndexTask(List<ContentType> contentTypes, List<ContentStatus> contentStatuses, JournalEntryType journalEntryType) - Specified by:
createContentIndexTask
in interfaceIndexTaskFactoryInternal
-
createIndexDraftsTask
- Specified by:
createIndexDraftsTask
in interfaceIndexTaskFactoryInternal
-
createUnIndexSpaceContentIndexTask
- Specified by:
createUnIndexSpaceContentIndexTask
in interfaceIndexTaskFactoryInternal
- Parameters:
handle
- space key
-
createUnIndexSpaceContentIndexTask
- Specified by:
createUnIndexSpaceContentIndexTask
in interfaceIndexTaskFactoryInternal
-
createUnIndexSpaceChangeIndexTask
- Specified by:
createUnIndexSpaceChangeIndexTask
in interfaceIndexTaskFactoryInternal
-
createUnIndexSpaceChangeIndexTask
- Specified by:
createUnIndexSpaceChangeIndexTask
in interfaceIndexTaskFactoryInternal
-
createUnindexContentTypeContentTask
- Specified by:
createUnindexContentTypeContentTask
in interfaceIndexTaskFactoryInternal
-
createUnindexContentTypeChangeTask
- Specified by:
createUnindexContentTypeChangeTask
in interfaceIndexTaskFactoryInternal
-
createReindexAllUsersContentTask
- Specified by:
createReindexAllUsersContentTask
in interfaceIndexTaskFactoryInternal
-
createReindexAllUsersChangeTask
- Specified by:
createReindexAllUsersChangeTask
in interfaceIndexTaskFactoryInternal
-
createReindexAllBlogsContentTask
- Specified by:
createReindexAllBlogsContentTask
in interfaceIndexTaskFactoryInternal
-
createReindexAllBlogsChangeTask
- Specified by:
createReindexAllBlogsChangeTask
in interfaceIndexTaskFactoryInternal
-
createReindexUsersInGroupContentTask
- Specified by:
createReindexUsersInGroupContentTask
in interfaceIndexTaskFactoryInternal
-
createReindexUsersInGroupChangeTask
- Specified by:
createReindexUsersInGroupChangeTask
in interfaceIndexTaskFactoryInternal
-
createDeleteDocumentTask
- Specified by:
createDeleteDocumentTask
in interfaceIndexTaskFactory
-
createDeleteDocumentTask
- Specified by:
createDeleteDocumentTask
in interfaceIndexTaskFactory
-
createUpdateDocumentTask
Returns an update document task.- Specified by:
createUpdateDocumentTask
in interfaceIndexTaskFactory
- Parameters:
searchable
- the searchable- Returns:
- an update document task or null if searchable is null or not indexable
-
createUpdateDocumentTask
public ConfluenceIndexTask createUpdateDocumentTask(Searchable searchable, boolean includeDependents) - Specified by:
createUpdateDocumentTask
in interfaceIndexTaskFactory
-
createAddDocumentTask
NOTE: Do not call this method without first callingcreateDeleteDocumentTask(Searchable)
for the same object. The index flushing strategy is intentionally inaccurate and relies on an in-memory 'flushed entries' cache to prevent the same object being flushed twice, which risks duplicate entries being created in the index immediately after the application is restarted. CONF-29072 has additional details.You probably want to use
createUpdateDocumentTask(Searchable)
instead - the delete operation will fail silently :)- Specified by:
createAddDocumentTask
in interfaceIndexTaskFactory
- Parameters:
searchable
- the searchable- Returns:
- an add document task or null if searchable is null or not indexable
-
createDeleteChangeDocumentsIndexTask
- Specified by:
createDeleteChangeDocumentsIndexTask
in interfaceIndexTaskFactory
- Parameters:
searchable
- the searchable- Returns:
- an index task to remove the change documents for this searchable, or a no op task otherwise.
-
createDeleteChangeDocumentsIndexTask
- Specified by:
createDeleteChangeDocumentsIndexTask
in interfaceIndexTaskFactory
- Parameters:
handle
- handle to the latest version- Returns:
- delete index task
-
createRebuildChangeDocumentsIndexTask
- Specified by:
createRebuildChangeDocumentsIndexTask
in interfaceIndexTaskFactory
-
createAddChangeDocumentTask
Constructs an add change document task.- Specified by:
createAddChangeDocumentTask
in interfaceIndexTaskFactory
- Parameters:
searchable
- the searchable- Returns:
- an add change document task or
NoOpIndexTask
if searchable is null
-
createReindexAllSpacesContentTask
- Specified by:
createReindexAllSpacesContentTask
in interfaceIndexTaskFactoryInternal
-
createReindexAllSpacesChangeTask
- Specified by:
createReindexAllSpacesChangeTask
in interfaceIndexTaskFactoryInternal
-