/** Enable local caching of resolved proxy classes. This can only be used * if there is a single ULR and no redeployment of the proxy classes. * * @param flag true to enable caching, false to disable it */ public static void useClassCache(boolean flag) { if( flag == true ) classCache = new WeakValueHashMap(); else classCache = null; }
protected void initSubDomainsByNameMap() { if (subDomainsByName == UnmodifiableEmptyCollections.EMPTY_WEAK_VALUE_HASHMAP) { synchronized(lazyCollectionLock) { if (subDomainsByName == UnmodifiableEmptyCollections.EMPTY_WEAK_VALUE_HASHMAP) { subDomainsByName = new WeakValueHashMap<String, Domain>(); } } } }
ItemReferencePool() { items = new WeakValueHashMap<String, ItemImpl>(); }
/** * Get the cache for the classloader * * @param cl the classloader * @return the map */ protected Map<String, T> getClassLoaderCache(ClassLoader cl) { synchronized (cache) { Map<String, T> result = cache.get(cl); if (result == null) { result = new WeakValueHashMap<String, T>(); cache.put(cl, result); } return result; } } }
cache = new WeakValueHashMap(); compositeDataMethodCache.put(clazz, cache);
cache = new WeakValueHashMap(); compositeDataMethodCache.put(clazz, cache);
modeMap = new WeakValueHashMap<BeanAccessMode, BeanInfo>(); classInfoMap.put(classInfo, modeMap);
if (map == null) map = new WeakValueHashMap<String, BeanInfo>(); cache.put(cl, map);