Package com.atlassian.confluence.user
Class UserMentionsContentReindexer
- java.lang.Object
-
- com.atlassian.confluence.user.UserMentionsContentReindexer
-
public class UserMentionsContentReindexer extends Object
Helper class for handling tasks related to reindexing content containing user mentions. Currently, the main use case is for removing deleted users from the search indexes for GDPR compliance.- Since:
- 6.13.0
-
-
Constructor Summary
Constructors Constructor Description UserMentionsContentReindexer(ConfluenceIndexer indexer, BatchOperationManager batchOperationManager, SearchManager searchManager, SynchronizationManager synchronizationManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
protected void
doReindex(String username)
WARNING: This method uses the BatchOperationManager, which will clear the current session and discard any unflushed or uncommitted changes made higher in the stack.void
reindex(ConfluenceUser user, String oldUsername)
Adds content with mentions to the index queue in batches by searching against a specific version of the search index.
-
-
-
Constructor Detail
-
UserMentionsContentReindexer
public UserMentionsContentReindexer(ConfluenceIndexer indexer, BatchOperationManager batchOperationManager, SearchManager searchManager, SynchronizationManager synchronizationManager)
-
-
Method Detail
-
reindex
public void reindex(ConfluenceUser user, String oldUsername)
Adds content with mentions to the index queue in batches by searching against a specific version of the search index. Changes to the search index should not affect the search results.- Since:
- 6.13
-
doReindex
protected void doReindex(String username) throws InvalidSearchException, SearchTokenExpiredException
WARNING: This method uses the BatchOperationManager, which will clear the current session and discard any unflushed or uncommitted changes made higher in the stack. Calls to this method should generally be done in a separate thread or otherwise outside the scope of a request. SeeBatchOperationManager.applyInBatches(Iterable, int, int, Function)
-
cleanUp
@PreDestroy public void cleanUp()
-
-