*
* @param data data to cache
*/
public void cache(AbstractNodeData data) {
NodeId id = data.getNodeState().getNodeId();
ReferenceMap map = (ReferenceMap) cache.get(id);
if (map == null) {
map = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
cache.put(id, map);
}
Object old = map.put(data.getPrimaryParentId(), data);
if (old != null) {
log.warn("overwriting cached item: " + old);
}
}