private static ConcurrentMap<String, Flags> getFilesMap(FileSystem fs) { ConcurrentMap<String, Flags> map; if (CndTraceFlags.L1_CACHE_FILE_UTILS) { L1Cache aCache = l1Cache; if (aCache != null) { map = aCache.get(fs); if (map != null) { return map; } } } try { maRefLock.lock(); Reference<ConcurrentMap<String, Flags>> mapRef = maps.get(fs); if (mapRef == null || (map = mapRef.get()) == null) { map = new ConcurrentHashMap<String, Flags>(); mapRef = new SoftReference<ConcurrentMap<String, Flags>>(map); maps.put(fs, mapRef); if (CndTraceFlags.L1_CACHE_FILE_UTILS) { l1Cache = new L1Cache(fs, mapRef); } } } finally { maRefLock.unlock(); } return map; }