public class DefaultSharedEntityIndexManager extends Object implements SharedEntityIndexManager
shared entities
Constructor and Description |
---|
DefaultSharedEntityIndexManager(SharedEntityIndexer indexer,
SearchRequestManager searchRequestManager,
PortalPageManager portalPageManager,
FileFactory fileFactory,
ApplicationProperties applicationProperties) |
Modifier and Type | Method and Description |
---|---|
long |
activate(Context context)
Activates search indexes.
|
long |
activate(Context context,
boolean reindex)
Activates search indexes.
|
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)
public long reIndexAll(Context context)
IndexLifecycleManager
reIndexAll
in interface IndexLifecycleManager
context
- used to report progress back to the user or to the logs. Must not be null.public long reIndexAll(Context context, IssueIndexingParams issueIndexingParams)
IndexLifecycleManager
IssueIndexingParams
.reIndexAll
in interface IndexLifecycleManager
context
- 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)
SharedEntityIndexManager
reIndexSharedEntities
in interface SharedEntityIndexManager
context
- 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
IndexException
public long reIndexAllIssuesInBackground(Context context)
IndexLifecycleManager
reIndexAllIssuesInBackground
in interface IndexLifecycleManager
context
- 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)
IndexLifecycleManager
reIndexAllIssuesInBackground
in interface IndexLifecycleManager
context
- 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)
IndexLifecycleManager
reIndexIssuesInBackground
in interface IndexLifecycleManager
context
- 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()
IndexLifecycleManager
optimize
in interface IndexLifecycleManager
public void shutdown()
IndexLifecycleManager
shutdown
in interface IndexLifecycleManager
shutdown
in interface Shutdown
public long activate(Context context, boolean reindex)
IndexLifecycleManager
activate
in interface IndexLifecycleManager
context
- 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)
IndexLifecycleManager
activate
in interface IndexLifecycleManager
context
- used to report progress back to the user or to the logs. Must not be null.public void deactivate()
IndexLifecycleManager
deactivate
in interface IndexLifecycleManager
public boolean isIndexingEnabled()
isIndexingEnabled
in interface IndexLifecycleManager
public boolean isIndexAvailable()
IndexLifecycleManager
isIndexAvailable
in interface IndexLifecycleManager
public boolean isIndexConsistent()
isIndexConsistent
in interface IndexLifecycleManager
false
.public Collection<String> getAllIndexPaths()
getAllIndexPaths
in interface IndexLifecycleManager
public int size()
size
in interface Sized
size
in interface IndexLifecycleManager
IndexLifecycleManager.reIndexAll(Context)
Copyright © 2002-2015 Atlassian. All Rights Reserved.