public class

MockIndexLifecycleManager

extends Object
implements IndexLifecycleManager
java.lang.Object
   ↳ com.atlassian.jira.util.index.MockIndexLifecycleManager

Summary

Public Constructors
MockIndexLifecycleManager()
Public Methods
long activate(Context context, boolean reindex)
Activates search indexes.
long activate(Context ctx)
Activates search indexes.
void deactivate()
De-activates indexing (as happens from the admin page) and removes index directories.
Collection<String> getAllIndexPaths()
boolean isEmpty()
boolean isIndexConsistent()
boolean isIndexingEnabled()
long optimize()
Optimize the underlying indexes.
long reIndexAll(Context ctx)
Reindex everything.
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
void shutdown()
Shuts down the indexing manager and closes its resources (if any).
int size()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.util.Shutdown
From interface com.atlassian.jira.util.collect.Sized
From interface com.atlassian.jira.util.index.IndexLifecycleManager

Public Constructors

public MockIndexLifecycleManager ()

Public Methods

public long activate (Context context, boolean reindex)

Activates search indexes.

Parameters
context used to report progress back to the user or to the logs. Must not be null.
reindex reindex after activation.
Returns
  • Reindex time in ms

public long activate (Context ctx)

Activates search indexes. This will rebuild the indexes.

Parameters
ctx used to report progress back to the user or to the logs. Must not be null.
Returns
  • Reindex time in ms

public void deactivate ()

De-activates indexing (as happens from the admin page) and removes index directories.

public Collection<String> getAllIndexPaths ()

public boolean isEmpty ()

public boolean isIndexConsistent ()

public boolean isIndexingEnabled ()

public long optimize ()

Optimize the underlying indexes. Make the subsequent searching more efficient.

Returns
  • the amount of time in millis this method took (because you are too lazy to time me), 0 if indexing is not enabled or -1 if we cannot obtain the index writeLock.

public long reIndexAll (Context ctx)

Reindex everything.

Parameters
ctx used to report progress back to the user or to the logs. Must not be null.
Returns
  • Reindex time in ms.

public long reIndexAllIssuesInBackground (Context context)

Reindex everything, but don't stop the world Comments and change history will not be reindexed.

Parameters
context used to report progress back to the user or to the logs. Must not be null.
Returns
  • Reindex time in ms.

public long reIndexAllIssuesInBackground (Context context, boolean reIndexComments, boolean reIndexChangeHistory)

Reindex everything, but don't stop the world

Parameters
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.
Returns
  • Reindex time in ms.

public void shutdown ()

Shuts down the indexing manager and closes its resources (if any).

public int size ()