Class CascadeSourceStash

java.lang.Object
org.alfresco.elasticsearch.batchindexing.cascade.CascadeSourceStash

public class CascadeSourceStash extends Object
Thread-safe, cycle-scoped bag of cascade sources observed during a batch-indexing cycle.

Populated by CascadeCollectorWriter as it observes ReindexingEvents flowing through the composite ItemWriter, then drained by CascadeSweepService once the enclosing reindexByDate job completes successfully.

Both maps are keyed by node reference so duplicate observations within a cycle (e.g., overlapping windows) collapse into a single cascade source. The first-observed value wins on rename to avoid overwriting the recorded name if the same node re-appears later in the cycle.

  • Constructor Details

    • CascadeSourceStash

      public CascadeSourceStash()
  • Method Details

    • recordRename

      public void recordRename(RenameCascadeSource source)
    • recordCategoryDelete

      public void recordCategoryDelete(CategoryDeleteCascadeSource source)
    • renameCount

      public int renameCount()
    • categoryDeleteCount

      public int categoryDeleteCount()
    • drain

      public CascadeSourceBatch drain()
      Atomically empties the stash and returns everything observed since the last call.
    • clear

      public void clear()