collectionEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); parentsByChild = new IdentityHashMap<>( INIT_COLL_SIZE );
LOG.trace( "Starting deserialization of [" + count + "] collectionEntries entries" ); rtn.collectionEntries = IdentityMap.instantiateSequenced( count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count ); for ( int i = 0; i < count; i++ ) { final PersistentCollection pc = (PersistentCollection) ois.readObject();
/** * Constructs a PersistentContext, bound to the given session. * * @param session The session "owning" this context. */ public StatefulPersistenceContext(SessionImplementor session) { this.session = session; entitiesByKey = new HashMap<EntityKey, Object>( INIT_COLL_SIZE ); entitiesByUniqueKey = new HashMap<EntityUniqueKey, Object>( INIT_COLL_SIZE ); //noinspection unchecked proxiesByKey = (Map<EntityKey, Object>) new ReferenceMap( AbstractReferenceMap.HARD, AbstractReferenceMap.WEAK ); entitySnapshotsByKey = new HashMap<EntityKey, Object>( INIT_COLL_SIZE ); entityEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); collectionEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); parentsByChild = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); collectionsByKey = new HashMap<CollectionKey, PersistentCollection>( INIT_COLL_SIZE ); arrayHolders = new IdentityHashMap<Object, PersistentCollection>( INIT_COLL_SIZE ); nullifiableEntityKeys = new HashSet<EntityKey>(); initTransientState(); }
/** * Constructs a PersistentContext, bound to the given session. * * @param session The session "owning" this context. */ public StatefulPersistenceContext(SessionImplementor session) { this.session = session; entitiesByKey = new HashMap<EntityKey, Object>( INIT_COLL_SIZE ); entitiesByUniqueKey = new HashMap<EntityUniqueKey, Object>( INIT_COLL_SIZE ); //noinspection unchecked proxiesByKey = (Map<EntityKey, Object>) new ReferenceMap( AbstractReferenceMap.HARD, AbstractReferenceMap.WEAK ); entitySnapshotsByKey = new HashMap<EntityKey, Object>( INIT_COLL_SIZE ); entityEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); collectionEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); parentsByChild = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); collectionsByKey = new HashMap<CollectionKey, PersistentCollection>( INIT_COLL_SIZE ); arrayHolders = new IdentityHashMap<Object, PersistentCollection>( INIT_COLL_SIZE ); nullifiableEntityKeys = new HashSet<EntityKey>(); initTransientState(); }
collectionEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); parentsByChild = new IdentityHashMap<>( INIT_COLL_SIZE );
rtn.entityEntries = IdentityMap.instantiateSequenced( count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count ); for ( int i = 0; i < count; i++ ) { Object entity = ois.readObject(); rtn.collectionEntries = IdentityMap.instantiateSequenced( count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count ); for ( int i = 0; i < count; i++ ) { final PersistentCollection pc = ( PersistentCollection ) ois.readObject();
rtn.entityEntries = IdentityMap.instantiateSequenced( count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count ); for ( int i = 0; i < count; i++ ) { Object entity = ois.readObject(); rtn.collectionEntries = IdentityMap.instantiateSequenced( count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count ); for ( int i = 0; i < count; i++ ) { final PersistentCollection pc = ( PersistentCollection ) ois.readObject();
persistentContent, new HashMap<>(INIT_COLL_SIZE)); StatefulPersistenceContextV5Reflection.setCollectionEntries( persistentContent, IdentityMap.instantiateSequenced(INIT_COLL_SIZE));
LOG.trace( "Starting deserialization of [" + count + "] collectionEntries entries" ); rtn.collectionEntries = IdentityMap.instantiateSequenced( count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count ); for ( int i = 0; i < count; i++ ) { final PersistentCollection pc = (PersistentCollection) ois.readObject();