public class

BulkOnlyIndexManager

extends DefaultIndexManager
java.lang.Object
   ↳ com.atlassian.jira.issue.index.DefaultIndexManager
     ↳ com.atlassian.jira.issue.index.BulkOnlyIndexManager

Class Overview

This index manager ignores calls to reIndex(org.ofbiz.core.entity.GenericValue), deIndex(org.ofbiz.core.entity.GenericValue) and reIndexIssues(Collection).

It should only be used where the indexer will manually call reIndexAll()!

Summary

[Expand]
Inherited Fields
From class com.atlassian.jira.issue.index.DefaultIndexManager
Public Constructors
BulkOnlyIndexManager(IndexingConfiguration properties, IssueIndexer issueIndexer, IndexPathManager indexPathManager, ReindexMessageManager reindexMessageManager, EventPublisher eventPublisher, ListenerManager listenerManager, ProjectManager projectManager, TaskManager taskManager, OfBizDelegator ofBizDelegator, ReplicatedIndexManager replicatedIndexManager, IssueManager issueManager, IssueSearcherFactory issueSearcherFactory, TimeTrackingConfiguration timeTrackingConfiguration)
private only for testing purposes (use the factory method to get an instance)
Public Methods
void deIndex(GenericValue entity)
Remove an issue from the search index.
void deIndex(Issue issue)
Remove an issue from the search index.
void hold()
Temporarily suspend indexing on this thread.
boolean isHeld()
Return true if the index is held.
long optimize()
Optimize the underlying indexes.
void reIndex(Issue entity)
Reindex an issue (eg.
void reIndex(GenericValue entity)
Reindex an issue (eg.
long reIndexAll()
Reindex all issues.
long reIndexAll(Event event)
long reIndexIssueObjects(Collection<? extends Issue> issueObjects)
Reindex a set of issues.
long reIndexIssues(IssuesIterable issuesIterable, Event event)
long reIndexIssues(Collection<GenericValue> issues)
Reindex a set of issues (GenericValues).
long release()
Release indexing on this thread.
String toString()
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.index.DefaultIndexManager
From class java.lang.Object
From interface com.atlassian.jira.issue.index.IssueIndexManager
From interface com.atlassian.jira.issue.index.IssueIndexingService
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 BulkOnlyIndexManager (IndexingConfiguration properties, IssueIndexer issueIndexer, IndexPathManager indexPathManager, ReindexMessageManager reindexMessageManager, EventPublisher eventPublisher, ListenerManager listenerManager, ProjectManager projectManager, TaskManager taskManager, OfBizDelegator ofBizDelegator, ReplicatedIndexManager replicatedIndexManager, IssueManager issueManager, IssueSearcherFactory issueSearcherFactory, TimeTrackingConfiguration timeTrackingConfiguration)

private only for testing purposes (use the factory method to get an instance)

Public Methods

public void deIndex (GenericValue entity)

Remove an issue from the search index.

public void deIndex (Issue issue)

Remove an issue from the search index.

public void hold ()

Temporarily suspend indexing on this thread. All index requests will be queued and processed when release is called.

public boolean isHeld ()

Return true if the index is held.

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 void reIndex (Issue entity)

Reindex an issue (eg. after field updates).

public void reIndex (GenericValue entity)

Reindex an issue (eg. after field updates).

public long reIndexAll ()

Reindex all issues.

Returns
  • The number of milliseconds taken to reindex everything, or -1 if not indexing

public long reIndexAll (Event event)

public long reIndexIssueObjects (Collection<? extends Issue> issueObjects)

Reindex a set of issues.

Parameters
issueObjects Set of Issues to reindex.
Returns
  • Reindex time in ms.

public long reIndexIssues (IssuesIterable issuesIterable, Event event)

public long reIndexIssues (Collection<GenericValue> issues)

Reindex a set of issues (GenericValues). Use reIndexIssueObjects(Collection) instead when possible.

Parameters
issues The Issue GenericValues to reindex.
Returns
  • Reindex time in ms.

public long release ()

Release indexing on this thread. All queued index requests will be processed.

Returns
  • Reindex time in ms.

public String toString ()