Class FrozenCollectionRows
java.lang.Object
org.hibernate.collection.spi.FrozenCollectionRows
@Incubating(since="8.0",
group="collection-delta")
public final class FrozenCollectionRows
extends Object
A validity-guarded projection of the current rows of a persistent collection.
The projection uses immutable segmented parallel arrays instead of allocating a second object for every collection row. Segments let production retain a single pass over the live collection without repeatedly copying a growing array. It retains the collection comparison generation and enumerates each included row directly into the physical consumer. Access fails if the collection changes after the projection is created.
- Since:
- 8.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionentry(int row) voidforEach(FrozenCollectionRows.RowConsumer consumer) static FrozenCollectionRowsfrom(PersistentCollection<?> collection, CollectionPersister persister) intposition(int row) intsize()
-
Method Details
-
from
public static FrozenCollectionRows from(PersistentCollection<?> collection, CollectionPersister persister) -
size
public int size() -
entry
-
position
public int position(int row) -
forEach
-