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 allows code that runs during or
immediately after flush action execution to answer questions about reachability, processing,
and queued logical collection actions. Implementations may delegate reachability and processing
queries to compact transient state on CollectionEntry while retaining mutation state in
the flush context.
Implementations are expected to identify collections by instance identity, matching the way persistent collections are tracked by the persistence context.
- Since:
- 8.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasQueuedCollectionAction(PersistentCollection<?> collection) Was any logical collection action queued for the collection during the current flush?booleanhasQueuedCollectionRemove(PersistentCollection<?> collection) Was a logical collection remove action queued for the collection during the current flush?booleanwasCollectionProcessed(PersistentCollection<?> collection) Was the collection already processed by collection reachability handling during the current flush?booleanwasCollectionReached(PersistentCollection<?> collection) Was the collection found reachable from a flushed entity during the current flush?
-
Method Details
-
wasCollectionReached
Was the collection found reachable from a flushed entity during the current flush?- Parameters:
collection- The collection instance- Returns:
trueif the collection was marked reachable
-
wasCollectionProcessed
Was the collection already processed by collection reachability handling during the current flush?- Parameters:
collection- The collection instance- Returns:
trueif the collection was marked processed
-
hasQueuedCollectionAction
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:
trueif at least one logical collection action was queued
-
hasQueuedCollectionRemove
Was a logical collection remove action queued for the collection during the current flush?- Parameters:
collection- The collection instance- Returns:
trueif a remove action was queued
-