Class ClusterSynchronisedIndexReplayStrategy
java.lang.Object
com.atlassian.jira.search.index.rio.ClusterSynchronisedIndexReplayStrategy
- All Implemented Interfaces:
IndexReplayStrategy
Orchestrates replaying the outstanding index operations to the search index.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionClusterSynchronisedIndexReplayStrategy(ReplicatedIndexOperationCounterService rioCounterService, ReplicatedIndexOperationsService rioService, WritableIndexAccessor indexAccessor, OpenSearchIndexReplayStats statsLogger, com.atlassian.instrumentation.Counter totalOperationCountInstrument, ClusterSynchronisedIndexReplayStrategyFactory.LatestGaugeValue latestGaugeValue) -
Method Summary
Modifier and TypeMethodDescriptionCreates a transaction for replaying index operations.com.atlassian.instrumentation.Countervoidreplay()Replays the outstanding index operations to the search index.
-
Constructor Details
-
ClusterSynchronisedIndexReplayStrategy
public ClusterSynchronisedIndexReplayStrategy(ReplicatedIndexOperationCounterService rioCounterService, ReplicatedIndexOperationsService rioService, WritableIndexAccessor indexAccessor, OpenSearchIndexReplayStats statsLogger, com.atlassian.instrumentation.Counter totalOperationCountInstrument, ClusterSynchronisedIndexReplayStrategyFactory.LatestGaugeValue latestGaugeValue)
-
-
Method Details
-
replay
Description copied from interface:IndexReplayStrategyReplays the outstanding index operations to the search index. This method is responsible for fetching the unprocessed index operations, processing them, and updating the index operation counter accordingly.- Specified by:
replayin interfaceIndexReplayStrategy- Throws:
SearchExceptionIndexOperationException
-
createTransaction
Description copied from interface:IndexReplayStrategyCreates a transaction for replaying index operations. This allows finer control over the replay process, enabling replays to be written to an index without writing the counter to the database- Specified by:
createTransactionin interfaceIndexReplayStrategy- Returns:
- a new transaction instance
-
getTotalOperationCountInstrument
public com.atlassian.instrumentation.Counter getTotalOperationCountInstrument() -
getLatestGaugeValue
-