pg = new Progress();
}
+ List<MetaData> copy;
synchronized (metasLock) {
// We make sure that cached metas have precedence
if (metasMixed == null) {
}
}
}
+
+ copy = new ArrayList<MetaData>(metasMixed);
}
pg.done();
- return new ArrayList<MetaData>(metasMixed);
+ return copy;
}
@Override
}
@Override
- public void delete(String luid) throws IOException {
+ public synchronized void delete(String luid) throws IOException {
if (isCached(luid)) {
cacheLib.delete(luid);
}
MetaData meta = lib.imprt(url, pgImprt);
updateMetaCache(metasReal, meta);
- synchronized (metasLock) {
- metasMixed = null;
- }
+ metasMixed = null;
clearFromCache(meta.getLuid());