Class CascadeSweepService
java.lang.Object
org.alfresco.elasticsearch.batchindexing.cascade.CascadeSweepService
Post-cycle orchestrator that drains the
CascadeSourceStash once a reindexByDate cycle finishes successfully and dispatches each observed cascade source to the appropriate cascade service.
Runs on the continuous-reindex thread after the batch job reaches BatchStatus.COMPLETED; sources observed during aborted / failed cycles are intentionally left in the stash so an operator can inspect them, and are discarded at the next clearStash().
Each source is applied independently and failures are logged, not propagated: one bad cascade must not block the rest of the batch. Cascade services already return 0 and log a warning on their own IO / OpenSearch failures, so this dispatcher only needs to guard against unexpected runtime exceptions.
-
Constructor Summary
ConstructorsConstructorDescriptionCascadeSweepService(CascadeSourceStash stash, RenameCascadeService renameCascadeService, CategoryDeleteCascadeService categoryDeleteCascadeService) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled immediately before a reindex cycle begins so that stale observations from a prior aborted or successful cycle do not leak into the new one.voidsweep()Called only after a reindex cycle completes withBatchStatus.COMPLETED.
-
Constructor Details
-
CascadeSweepService
public CascadeSweepService(CascadeSourceStash stash, RenameCascadeService renameCascadeService, CategoryDeleteCascadeService categoryDeleteCascadeService)
-
-
Method Details
-
clearStash
public void clearStash()Called immediately before a reindex cycle begins so that stale observations from a prior aborted or successful cycle do not leak into the new one. -
sweep
public void sweep()Called only after a reindex cycle completes withBatchStatus.COMPLETED. Drains the stash and dispatches each cascade source to its service.
-