Package org.apache.commons.collections

Examples of org.apache.commons.collections.ReferenceMap$SoftRef


    }

    public void clearAll() {
        // Just make a new one
        if (log.isDebugEnabled()) log.debug("Cleared entire " + type + " cache.");
        cache = Collections.synchronizedMap(new ReferenceMap());
        if (cacheMonitor != null) {
            cacheMonitor.allElementsEvicted();
        }
    }
View Full Code Here


    public SoftRandomAccessResultList(ResultObjectProvider rop) {
        super(rop);
    }

    protected Map newRowMap() {
        return new ReferenceMap();
    }
View Full Code Here

   */
  private synchronized void init() {
    if (this.objectCache == null)
      this.objectCache =
        Collections.synchronizedMap(
          new ReferenceMap(ReferenceMap.SOFT, ReferenceMap.SOFT));
  }
View Full Code Here

  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

        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

    /**
     * @see org.apache.avalon.framework.service.Serviceable#service(ServiceManager)
     */
    public void service(ServiceManager comp) {
        compMgr = new DefaultServiceManager(comp);
        mailboxes = new ReferenceMap();
    }
View Full Code Here

    /**
     * @see org.apache.avalon.framework.service.Serviceable#service(ServiceManager)
     */
    public void service(ServiceManager comp) {
        compMgr = new DefaultServiceManager(comp);
        mailboxes = new ReferenceMap();
    }
View Full Code Here

     */
    public void initialize()
        throws Exception {

        getLogger().info("JamesMailStore init...");
        repositories = new ReferenceMap();
        classes = new HashMap();
        defaultConfigs = new HashMap();
        Configuration[] registeredClasses
            = configuration.getChild("repositories").getChildren("repository");
        for ( int i = 0; i < registeredClasses.length; i++ )
View Full Code Here

     */
    public void initialize()
        throws Exception {

        getLogger().info("JamesMailStore init...");
        repositories = new ReferenceMap();
        classes = new HashMap();
        defaultConfigs = new HashMap();
        Configuration[] registeredClasses
            = configuration.getChild("repositories").getChildren("repository");
        for ( int i = 0; i < registeredClasses.length; i++ )
View Full Code Here

  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

TOP

Related Classes of org.apache.commons.collections.ReferenceMap$SoftRef

Copyright © 2018 www.massapicom. 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.