Examples of ReferenceMap


Examples of org.apache.commons.collections.map.ReferenceMap

        rtn.entitiesByUniqueKey.put( EntityUniqueKey.deserialize( ois, session ), ois.readObject() );
      }

      count = ois.readInt();
      log.trace( "staring deserialization of [" + count + "] proxiesByKey entries" );
      rtn.proxiesByKey = new ReferenceMap( ReferenceMap.HARD, ReferenceMap.WEAK, count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count, .75f );
      for ( int i = 0; i < count; i++ ) {
        EntityKey ek = EntityKey.deserialize( ois, session );
        Object proxy = ois.readObject();
        if ( proxy instanceof HibernateProxy ) {
          ( ( HibernateProxy ) proxy ).getHibernateLazyInitializer().setSession( session );
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

  public StatefulPersistenceContext(SessionImplementor session) {
    this.session = session;

    entitiesByKey = new HashMap( INIT_COLL_SIZE );
    entitiesByUniqueKey = new HashMap( INIT_COLL_SIZE );
    proxiesByKey = new ReferenceMap( ReferenceMap.HARD, ReferenceMap.WEAK );
    entitySnapshotsByKey = new HashMap( INIT_COLL_SIZE );

    entityEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE );
    collectionEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE );
    collectionsByKey = new HashMap( INIT_COLL_SIZE );
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

        rtn.entitiesByUniqueKey.put( EntityUniqueKey.deserialize( ois, session ), ois.readObject() );
      }

      count = ois.readInt();
      log.trace( "staring deserialization of [" + count + "] proxiesByKey entries" );
      rtn.proxiesByKey = new ReferenceMap( ReferenceMap.HARD, ReferenceMap.WEAK, count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count, .75f );
      for ( int i = 0; i < count; i++ ) {
        EntityKey ek = EntityKey.deserialize( ois, session );
        Object proxy = ois.readObject();
        if ( proxy instanceof HibernateProxy ) {
          ( ( HibernateProxy ) proxy ).getHibernateLazyInitializer().setSession( session );
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

  public StatefulPersistenceContext(SessionImplementor session) {
    this.session = session;

    entitiesByKey = new HashMap( INIT_COLL_SIZE );
    entitiesByUniqueKey = new HashMap( INIT_COLL_SIZE );
    proxiesByKey = new ReferenceMap( ReferenceMap.HARD, ReferenceMap.WEAK );
    entitySnapshotsByKey = new HashMap( INIT_COLL_SIZE );

    entityEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE );
    collectionEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE );
    collectionsByKey = new HashMap( INIT_COLL_SIZE );
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

        rtn.entitiesByUniqueKey.put( EntityUniqueKey.deserialize( ois, session ), ois.readObject() );
      }

      count = ois.readInt();
      log.trace( "staring deserialization of [" + count + "] proxiesByKey entries" );
      rtn.proxiesByKey = new ReferenceMap( ReferenceMap.HARD, ReferenceMap.WEAK, count < INIT_COLL_SIZE ? INIT_COLL_SIZE : count, .75f );
      for ( int i = 0; i < count; i++ ) {
        EntityKey ek = EntityKey.deserialize( ois, session );
        Object proxy = ois.readObject();
        if ( proxy instanceof HibernateProxy ) {
          ( ( HibernateProxy ) proxy ).getHibernateLazyInitializer().setSession( session );
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

         */
        protected Map getOldSerializedViewsMap()
        {
            if (_oldSerializedViews == null)
            {
                _oldSerializedViews = new ReferenceMap();
            }
            return _oldSerializedViews;
        }
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

     *
     * @since 3.0
     * @return a map with hard referenced keys and weak referenced values.
     */
    static Map<Object, Persistent> createObjectMap() {
        return new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.WEAK);
    }
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

        this.ntReg = ntReg;
        this.ntReg.addListener(this);
        this.valueFactory = mgrProvider.getJcrValueFactory();

        // setup caches with soft references to node type
        ntCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
        pdCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
        ndCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
    }
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

        this.ntReg.addListener(this);
        this.store = store;

        // setup caches with soft references to node type
        // & item definition instances
        ntCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
        pdCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
        ndCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);

        rootNodeDef =
            new NodeDefinitionImpl(ntReg.getRootNodeDef(), this, session);
        ndCache.put(rootNodeDef.unwrap(), rootNodeDef);
    }
View Full Code Here

Examples of org.apache.commons.collections.map.ReferenceMap

        this.nsReg = nsReg;
        this.ntReg.addListener(this);

        // setup caches with soft references to node type
        // & item definition instances
        ntCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
        pdCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
        ndCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);

        rootNodeDef = new NodeDefinitionImpl(ntReg.getRootNodeDef(), this,
                nsResolver);
        ndCache.put(rootNodeDef.unwrap().getId(), rootNodeDef);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.