You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Gopal V (JIRA)" <ji...@apache.org> on 2015/03/28 05:09:53 UTC
[jira] [Created] (HADOOP-11771) Configuration::getClassByNameOrNull
synchronizes on a static object
Gopal V created HADOOP-11771:
--------------------------------
Summary: Configuration::getClassByNameOrNull synchronizes on a static object
Key: HADOOP-11771
URL: https://issues.apache.org/jira/browse/HADOOP-11771
Project: Hadoop Common
Issue Type: Sub-task
Reporter: Gopal V
{code}
private static final Map<ClassLoader, Map<String, WeakReference<Class<?>>>>
CACHE_CLASSES = new WeakHashMap<ClassLoader, Map<String, WeakReference<Class<?>>>>();
...
synchronized (CACHE_CLASSES) {
map = CACHE_CLASSES.get(classLoader);
if (map == null) {
map = Collections.synchronizedMap(
new WeakHashMap<String, WeakReference<Class<?>>>());
CACHE_CLASSES.put(classLoader, map);
}
}
{code}
!configuration-sync-cache.png!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)