private void createClass2(ClassLoader cl) { String key = getKey(superClass, interfaces, signature, factoryWriteReplace); /* * Excessive concurrency causes a large memory footprint and slows the * execution speed down (with JDK 1.5). Thus, we use a jumbo lock for * reducing concrrency. */ // synchronized (proxyCache) { HashMap cacheForTheLoader = (HashMap)proxyCache.get(cl); ProxyDetails details; if (cacheForTheLoader == null) { cacheForTheLoader = new HashMap(); proxyCache.put(cl, cacheForTheLoader); } details = (ProxyDetails)cacheForTheLoader.get(key); if (details != null) { WeakReference reference = details.proxyClass; thisClass = (Class)reference.get(); if (thisClass != null) { return; } } createClass3(cl); details = new ProxyDetails(signature, thisClass, factoryWriteReplace); cacheForTheLoader.put(key, details); // } }
private void createClass2(ClassLoader cl, Lookup lookup) { String key = getKey(superClass, interfaces, signature, factoryWriteReplace); /* * Excessive concurrency causes a large memory footprint and slows the * execution speed down (with JDK 1.5). Thus, we use a jumbo lock for * reducing concrrency. */ // synchronized (proxyCache) { Map<String,ProxyDetails> cacheForTheLoader = proxyCache.get(cl); ProxyDetails details; if (cacheForTheLoader == null) { cacheForTheLoader = new HashMap<String,ProxyDetails>(); proxyCache.put(cl, cacheForTheLoader); } details = cacheForTheLoader.get(key); if (details != null) { Reference<Class<?>> reference = details.proxyClass; thisClass = reference.get(); if (thisClass != null) { return; } } createClass3(cl, lookup); details = new ProxyDetails(signature, thisClass, factoryWriteReplace); cacheForTheLoader.put(key, details); // } }
private void createClass2(ClassLoader cl) { String key = getKey(superClass, interfaces, signature, factoryWriteReplace); /* * Excessive concurrency causes a large memory footprint and slows the * execution speed down (with JDK 1.5). Thus, we use a jumbo lock for * reducing concrrency. */ // synchronized (proxyCache) { HashMap cacheForTheLoader = (HashMap)proxyCache.get(cl); ProxyDetails details; if (cacheForTheLoader == null) { cacheForTheLoader = new HashMap(); proxyCache.put(cl, cacheForTheLoader); } details = (ProxyDetails)cacheForTheLoader.get(key); if (details != null) { WeakReference reference = details.proxyClass; thisClass = (Class)reference.get(); if (thisClass != null) { return; } } createClass3(cl); details = new ProxyDetails(signature, thisClass, factoryWriteReplace); cacheForTheLoader.put(key, details); // } }
private void createClass2(ClassLoader cl) { String key = getKey(superClass, interfaces, signature, factoryWriteReplace); /* * Excessive concurrency causes a large memory footprint and slows the * execution speed down (with JDK 1.5). Thus, we use a jumbo lock for * reducing concrrency. */ // synchronized (proxyCache) { HashMap cacheForTheLoader = (HashMap)proxyCache.get(cl); ProxyDetails details; if (cacheForTheLoader == null) { cacheForTheLoader = new HashMap(); proxyCache.put(cl, cacheForTheLoader); } details = (ProxyDetails)cacheForTheLoader.get(key); if (details != null) { WeakReference reference = details.proxyClass; thisClass = (Class)reference.get(); if (thisClass != null) { return; } } createClass3(cl); details = new ProxyDetails(signature, thisClass, factoryWriteReplace); cacheForTheLoader.put(key, details); // } }
private void createClass2(ClassLoader cl) { String key = getKey(superClass, interfaces, signature, factoryWriteReplace); /* * Excessive concurrency causes a large memory footprint and slows the * execution speed down (with JDK 1.5). Thus, we use a jumbo lock for * reducing concrrency. */ // synchronized (proxyCache) { HashMap cacheForTheLoader = (HashMap)proxyCache.get(cl); ProxyDetails details; if (cacheForTheLoader == null) { cacheForTheLoader = new HashMap(); proxyCache.put(cl, cacheForTheLoader); } details = (ProxyDetails)cacheForTheLoader.get(key); if (details != null) { WeakReference reference = details.proxyClass; thisClass = (Class)reference.get(); if (thisClass != null) { return; } } createClass3(cl); details = new ProxyDetails(signature, thisClass, factoryWriteReplace); cacheForTheLoader.put(key, details); // } }
private void createClass2(ClassLoader cl) { String key = getKey(superClass, interfaces, signature, factoryWriteReplace); /* * Excessive concurrency causes a large memory footprint and slows the * execution speed down (with JDK 1.5). Thus, we use a jumbo lock for * reducing concrrency. */ // synchronized (proxyCache) { HashMap cacheForTheLoader = (HashMap)proxyCache.get(cl); ProxyDetails details; if (cacheForTheLoader == null) { cacheForTheLoader = new HashMap(); proxyCache.put(cl, cacheForTheLoader); } details = (ProxyDetails)cacheForTheLoader.get(key); if (details != null) { WeakReference reference = details.proxyClass; thisClass = (Class)reference.get(); if (thisClass != null) { return; } } createClass3(cl); details = new ProxyDetails(signature, thisClass, factoryWriteReplace); cacheForTheLoader.put(key, details); // } }