use of org.apache.geode.internal.util.concurrent.CopyOnWriteHashMap in project geode by apache.
the class FilterProfile method registerFilterClassInMap.
private void registerFilterClassInMap(Object interest, Long clientID, Map<Object, Map> filts) {
// get instance of the filter
Class filterClass;
InterestFilter filter;
try {
filterClass = ClassLoadUtil.classFromName((String) interest);
filter = (InterestFilter) filterClass.newInstance();
} catch (ClassNotFoundException cnfe) {
throw new RuntimeException(LocalizedStrings.CacheClientProxy_CLASS_0_NOT_FOUND_IN_CLASSPATH.toLocalizedString(interest), cnfe);
} catch (Exception e) {
throw new RuntimeException(LocalizedStrings.CacheClientProxy_CLASS_0_COULD_NOT_BE_INSTANTIATED.toLocalizedString(interest), e);
}
Map interestMap = filts.get(clientID);
if (interestMap == null) {
interestMap = new CopyOnWriteHashMap();
filts.put(clientID, interestMap);
}
interestMap.put(interest, filter);
}
Aggregations