Class WatermarkBootstrap
java.lang.Object
org.alfresco.elasticsearch.batchindexing.WatermarkBootstrap
One-shot startup guard and cursor seed for the batch-indexing watermark. Bundles three opt-in behaviours so the
ContinuousReindexingConfig bean wiring reads like a single call:
ContinuousReindexingProperties#isAutoCreateStateIndex()— whenfalse, refuse to start on a missing state index instead of silently bootstrapping fresh.ContinuousReindexingProperties#isBootstrapFromAlfrescoIndex()— whentrueand the state doc is missing, seed the cursor fromMAX(METADATA_INDEXING_LAST_UPDATE)on the Alfresco index instead of the "start fromnow − overlap" first-run default.ContinuousReindexingProperties#isRequireAlfrescoIndex()— whentrueand the state doc records real indexing progress, refuse to start if the Alfresco index is missing (silent data loss guard).
-
Constructor Summary
ConstructorsConstructorDescriptionWatermarkBootstrap(ElasticsearchWatermarkStore store, org.opensearch.client.opensearch.OpenSearchClient openSearchClient, ContinuousReindexingProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidRun the startup dance: enforce the state-index guard, ensure the state index exists, seed the cursor from the Alfresco index if applicable, enforce the Alfresco-index presence guard.
-
Constructor Details
-
WatermarkBootstrap
public WatermarkBootstrap(ElasticsearchWatermarkStore store, org.opensearch.client.opensearch.OpenSearchClient openSearchClient, ContinuousReindexingProperties properties)
-
-
Method Details
-
bootstrap
Run the startup dance: enforce the state-index guard, ensure the state index exists, seed the cursor from the Alfresco index if applicable, enforce the Alfresco-index presence guard. Any failure aborts startup by throwing.- Throws:
WatermarkAccessException
-