Interface CollectionFlushActionTracker


@Incubating public interface CollectionFlushActionTracker

Read-only view of collection processing state and actions planned during the current flush.

A tracker is associated with a single flush cycle. It exposes state that used to be stored as transient flags on CollectionEntry, allowing code that runs during or immediately after flush action execution to answer questions about reachability, processing, and queued logical collection actions without mutating the entry itself.

Implementations are expected to identify collections by instance identity, matching the way persistent collections are tracked by the persistence context.

Since:
8.0
  • Method Details

    • wasCollectionReached

      boolean wasCollectionReached(PersistentCollection<?> collection)
      Was the collection found reachable from a flushed entity during the current flush?
      Parameters:
      collection - The collection instance
      Returns:
      true if the collection was marked reachable
    • wasCollectionProcessed

      boolean wasCollectionProcessed(PersistentCollection<?> collection)
      Was the collection already processed by collection reachability handling during the current flush?
      Parameters:
      collection - The collection instance
      Returns:
      true if the collection was marked processed
    • hasQueuedCollectionAction

      boolean hasQueuedCollectionAction(PersistentCollection<?> collection)

      Was any logical collection action queued for the collection during the current flush?

      This includes recreate, remove, and update actions, independent of whether a later optimization suppresses the physical action.

      Parameters:
      collection - The collection instance
      Returns:
      true if at least one logical collection action was queued
    • hasQueuedCollectionRemove

      boolean hasQueuedCollectionRemove(PersistentCollection<?> collection)
      Was a logical collection remove action queued for the collection during the current flush?
      Parameters:
      collection - The collection instance
      Returns:
      true if a remove action was queued