Examples of ReferenceMap


Examples of com.espertech.esper.collection.apachecommons.ReferenceMap

        {
            this.cache = new HashMap<Object, Item>();
        }
        else if (cacheReferenceType == ConfigurationCacheReferenceType.SOFT)
        {
            this.cache = new ReferenceMap(ReferenceMap.SOFT, ReferenceMap.SOFT);
        }
        else
        {
            this.cache = new WeakHashMap<Object, Item>();
        }
View Full Code Here

Examples of com.google.gwt.thirdparty.org.apache.commons.collections.map.ReferenceMap

  @SuppressWarnings("unchecked")
  private static Map<String, ModuleDef> getModulesCache() {
    ClassLoader keyClassLoader = Thread.currentThread().getContextClassLoader();
    Map<String, ModuleDef> cache = loadedModulesCaches.get(keyClassLoader);
    if (cache == null) {
      cache = new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.SOFT);
      loadedModulesCaches.put(keyClassLoader, cache);
    }
    return cache;
  }
View Full Code Here

Examples of org.apache.commons.collections.ReferenceMap

    try
    {
      Object cacheKey = getGrammarPoolCacheKey();
     
      // we're using thread local caches to avoid thread safety problems
      ReferenceMap cacheMap = (ReferenceMap) GRAMMAR_POOL_CACHE.get();
      if (cacheMap == null)
      {
        cacheMap = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.SOFT);
        GRAMMAR_POOL_CACHE.set(cacheMap);
      }
     
      Object grammarPool = cacheMap.get(cacheKey);
      if (grammarPool == null)
      {
        if (log.isDebugEnabled())
        {
          log.debug("Instantiating grammar pool of type " + poolClassName
              + " for cache key " + cacheKey);
        }

        grammarPool = ClassUtils.instantiateClass(poolClassName, Object.class);
        cacheMap.put(cacheKey, grammarPool);
      }
     
      parser.setProperty(XERCES_PARSER_PROPERTY_GRAMMAR_POOL, grammarPool);
    }
    catch (Exception e)
View Full Code Here

Examples of org.apache.commons.collections.ReferenceMap

  {
    Object key = classCacheKey();
    Map contextMap = (Map) classCache.get(key);
    if (contextMap == null)
    {
      contextMap = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
      classCache.put(key, contextMap);
    }
    contextMap.put(className, loadedClass);
  }
View Full Code Here

Examples of org.apache.commons.collections.ReferenceMap

   *
   * @param itf a interface or class that should be implemented by all classes cached by this object
   */
  public JRSingletonCache(Class itf)
  {
    cache = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.SOFT);
    this.itf = itf;
  }
View Full Code Here

Examples of org.apache.commons.collections.ReferenceMap

  {
    Object contextKey = getContextKey();
    Map contextCache = (Map) cache.get(contextKey);
    if (contextCache == null)
    {
      contextCache = new ReferenceMap();
      cache.put(contextKey, contextCache);
    }
    return contextCache;
  }
View Full Code Here

Examples of org.apache.commons.collections.ReferenceMap

   *            cache.
   */
  protected JRAbstractLRUVirtualizer(int maxSize)
  {
    this.pagedIn = new Cache(maxSize);
    this.pagedOut = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
    this.lastObject = null;

    this.lastObjectMap = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.WEAK);
    this.lastObjectSet = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.HARD);
  }
View Full Code Here

Examples of org.apache.commons.collections.ReferenceMap

    initTemplatesMap();
   
    this.originProvider = factory.getParentOriginProvider();
    setElementOriginProvider(this.originProvider);
   
    transformedContentsCache = new ReferenceMap();
    boxContentsCache = new HashMap();
    clonePool = new JRClonePool(this, true, true);
  }
View Full Code Here

Examples of org.apache.commons.collections.ReferenceMap

   
    this.templateFrames = cellContents.templateFrames;
   
    this.originProvider = cellContents.originProvider;
   
    transformedContentsCache = new ReferenceMap();
    boxContentsCache = new HashMap();
    clonePool = new JRClonePool(this, true, true);
   
    verticalPositionType = cellContents.verticalPositionType;
  }
View Full Code Here

Examples of org.apache.commons.collections.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
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.