use of org.datanucleus.util.WeakValueMap in project hive by apache.
the class ObjectStore method clearFieldMap.
private static long clearFieldMap(ClassLoaderResolverImpl clri, String mapFieldName) throws Exception {
Field mapField = ClassLoaderResolverImpl.class.getDeclaredField(mapFieldName);
mapField.setAccessible(true);
Map<String, Class> map = (Map<String, Class>) mapField.get(clri);
long sz = map.size();
mapField.set(clri, Collections.synchronizedMap(new WeakValueMap()));
return sz;
}
Aggregations