public class

DefaultNodeReindexService

extends Object
implements NodeReindexService
java.lang.Object
   ↳ com.atlassian.jira.index.ha.DefaultNodeReindexService

Class Overview

Runs periodically and reindexes issues that have been indexed in other nodes

Summary

Constants
String ISSUE_ENTITY
Public Constructors
DefaultNodeReindexService(ClusterManager clusterManager, OfBizNodeIndexCounterStore ofBizNodeIndexCounterStore, OfBizReplicatedIndexOperationStore ofBizNodeIndexOperationStore, IssueIndexManager indexManager, SharedEntityIndexer sharedEntityIndexer, ProjectManager projectManager, ProjectReindexService projectReindexService, IssueManager issueManager, CommentManager commentManager, WorklogManager worklogManager, OfBizDelegator ofBizDelegator, SharedEntityResolver sharedEntityResolver, IndexCopyService indexCopyService, IssueIndexingService indexingService, IssueFactory issueFactory)
Public Methods
boolean canIndexBeRebuilt()
Returns true if the index on the invoking node can be rebuilt from the information contained in the ReplicatedIndexOperationStore.
void cancel()
synchronized void pause()
Pause the service.
void replayLocalOperations()
This will replay any local operations that may have been lost when a index is copied from another node in the cluster
void resetIndexCount()
Reset the index count to the last entry in the NodeIndexOperation table for each node.
void restart()
synchronized void start()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.index.ha.NodeReindexService

Constants

public static final String ISSUE_ENTITY

Constant Value: "Issue"

Public Constructors

public DefaultNodeReindexService (ClusterManager clusterManager, OfBizNodeIndexCounterStore ofBizNodeIndexCounterStore, OfBizReplicatedIndexOperationStore ofBizNodeIndexOperationStore, IssueIndexManager indexManager, SharedEntityIndexer sharedEntityIndexer, ProjectManager projectManager, ProjectReindexService projectReindexService, IssueManager issueManager, CommentManager commentManager, WorklogManager worklogManager, OfBizDelegator ofBizDelegator, SharedEntityResolver sharedEntityResolver, IndexCopyService indexCopyService, IssueIndexingService indexingService, IssueFactory issueFactory)

Public Methods

public boolean canIndexBeRebuilt ()

Returns true if the index on the invoking node can be rebuilt from the information contained in the ReplicatedIndexOperationStore. If the ReplicatedIndexOperationStore is empty then it is assumed the index can be rebuilt.

Returns
  • true if the index can be rebuilt

public void cancel ()

public synchronized void pause ()

Pause the service. This will wait for any current execution of the service polling to finish.

public void replayLocalOperations ()

This will replay any local operations that may have been lost when a index is copied from another node in the cluster

public void resetIndexCount ()

Reset the index count to the last entry in the NodeIndexOperation table for each node. This is done to mark the current state before getting a new index copy or performing a full reindex.

It would normally be done immediately following a pause() of the service.

public void restart ()

public synchronized void start ()