public class DefaultSharedEntityIndexManager extends Object implements SharedEntityIndexManager
shared entities| Constructor and Description |
|---|
DefaultSharedEntityIndexManager(SharedEntityIndexer indexer,
SearchRequestManager searchRequestManager,
PortalPageManager portalPageManager,
FileFactory fileFactory,
ApplicationProperties applicationProperties,
IndexBackupContributorsManager indexBackupContributorsManager) |
| Modifier and Type | Method and Description |
|---|---|
long |
activate(Context context)
Activates search indexes.
|
long |
activate(Context context,
boolean reindex)
Activates search indexes.
|
void |
contributeToBackup(BackupBuilder backupBuilder)
Contribute a set of files to the given
backupBuilder to include them in the backup being created when this method was called. |
void |
deactivate()
De-activates indexing (as happens from the admin page) and removes index directories.
|
Collection<String> |
getAllIndexPaths() |
boolean |
isEmpty() |
boolean |
isIndexAvailable()
Whether this index is available.
|
boolean |
isIndexConsistent() |
boolean |
isIndexingEnabled() |
long |
optimize()
Optimize the underlying indexes.
|
long |
reIndexAll() |
long |
reIndexAll(Context context)
Reindex everything.
|
long |
reIndexAll(Context context,
IssueIndexingParams issueIndexingParams)
Reindex indexes defined by the
IssueIndexingParams. |
long |
reIndexAllIssuesInBackground(Context context)
Reindex everything, but don't stop the world
Comments and change history will not be reindexed.
|
long |
reIndexAllIssuesInBackground(Context context,
boolean reIndexComments,
boolean reIndexChangeHistory)
Reindex everything, but don't stop the world
|
long |
reIndexIssuesInBackground(Context context,
IssueIndexingParams issueIndexingParams)
Reindex everything, but don't stop the world
|
long |
reIndexSharedEntities(Context context,
IssueIndexingParams issueIndexingParams,
Set<SharedEntity.TypeDescriptor> sharedEntityTypes)
Reindex the specified shared entity types.
|
void |
shutdown()
Shuts down the indexing manager and closes its resources (if any).
|
int |
size() |
String |
toString() |
public DefaultSharedEntityIndexManager(SharedEntityIndexer indexer, SearchRequestManager searchRequestManager, PortalPageManager portalPageManager, FileFactory fileFactory, ApplicationProperties applicationProperties, IndexBackupContributorsManager indexBackupContributorsManager)
public long reIndexAll(Context context)
IndexLifecycleManagerreIndexAll in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.public long reIndexAll(Context context, IssueIndexingParams issueIndexingParams)
IndexLifecycleManagerIssueIndexingParams.reIndexAll in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.issueIndexingParams - indexes to reindex.public long reIndexSharedEntities(@Nonnull Context context, @Nonnull IssueIndexingParams issueIndexingParams, @Nonnull Set<SharedEntity.TypeDescriptor> sharedEntityTypes)
SharedEntityIndexManagerreIndexSharedEntities in interface SharedEntityIndexManagercontext - used to report progress back to the user or to the logs.issueIndexingParams - indexes to reindex.sharedEntityTypes - the shared entity types to reindex.public long reIndexAll()
throws IndexException
IndexExceptionpublic long reIndexAllIssuesInBackground(Context context)
IndexLifecycleManagerreIndexAllIssuesInBackground in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.public long reIndexAllIssuesInBackground(Context context, boolean reIndexComments, boolean reIndexChangeHistory)
IndexLifecycleManagerreIndexAllIssuesInBackground in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.reIndexComments - Also reindex all the issue comments.reIndexChangeHistory - Also reindex the issue change history.public long reIndexIssuesInBackground(Context context, IssueIndexingParams issueIndexingParams)
IndexLifecycleManagerreIndexIssuesInBackground in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.issueIndexingParams - determines witch related objects should be indexed together with issue.public long optimize()
IndexLifecycleManageroptimize in interface IndexLifecycleManagerpublic void shutdown()
IndexLifecycleManagershutdown in interface IndexLifecycleManagershutdown in interface Shutdownpublic long activate(Context context, boolean reindex)
IndexLifecycleManageractivate in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.reindex - reindex after activation.public long activate(Context context)
IndexLifecycleManageractivate in interface IndexLifecycleManagercontext - used to report progress back to the user or to the logs. Must not be null.public void deactivate()
IndexLifecycleManagerdeactivate in interface IndexLifecycleManagerpublic boolean isIndexingEnabled()
isIndexingEnabled in interface IndexLifecycleManagerpublic boolean isIndexAvailable()
IndexLifecycleManagerisIndexAvailable in interface IndexLifecycleManagerpublic boolean isIndexConsistent()
isIndexConsistent in interface IndexLifecycleManagerfalse. Note that false is also returned if the index
is not available IndexLifecycleManager.isIndexAvailable().public Collection<String> getAllIndexPaths()
getAllIndexPaths in interface IndexLifecycleManagerpublic int size()
size in interface Sizedsize in interface IndexLifecycleManagerIndexLifecycleManager.reIndexAll(Context)public void contributeToBackup(BackupBuilder backupBuilder)
BackupContributorbackupBuilder to include them in the backup being created when this method was called.contributeToBackup in interface BackupContributorbackupBuilder - builder of the backup being created at the time of call. All existing and nonempty files passed to its accept method will be included. The builder may not be reusable and the reference should not be stored outside the scope of this methodCopyright © 2002-2022 Atlassian. All Rights Reserved.