git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
weblib: fixes
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
library
/
CacheLibrary.java
diff --git
a/src/be/nikiroo/fanfix/library/CacheLibrary.java
b/src/be/nikiroo/fanfix/library/CacheLibrary.java
index 23f19a9ed323de88cb2202c6cde7462bf53219de..e184c1bd6555e7d79547ab61ab774d92e5b608ff 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/CacheLibrary.java
+++ b/
src/be/nikiroo/fanfix/library/CacheLibrary.java
@@
-67,6
+67,7
@@
public class CacheLibrary extends BasicLibrary {
pg = new Progress();
}
pg = new Progress();
}
+ List<MetaData> copy;
synchronized (metasLock) {
// We make sure that cached metas have precedence
if (metasMixed == null) {
synchronized (metasLock) {
// We make sure that cached metas have precedence
if (metasMixed == null) {
@@
-86,10
+87,12
@@
public class CacheLibrary extends BasicLibrary {
}
}
}
}
}
}
+
+ copy = new ArrayList<MetaData>(metasMixed);
}
pg.done();
}
pg.done();
- return
new ArrayList<MetaData>(metasMixed)
;
+ return
copy
;
}
@Override
}
@Override
@@
-326,7
+329,7
@@
public class CacheLibrary extends BasicLibrary {
}
@Override
}
@Override
- public void delete(String luid) throws IOException {
+ public
synchronized
void delete(String luid) throws IOException {
if (isCached(luid)) {
cacheLib.delete(luid);
}
if (isCached(luid)) {
cacheLib.delete(luid);
}
@@
-404,9
+407,7
@@
public class CacheLibrary extends BasicLibrary {
MetaData meta = lib.imprt(url, pgImprt);
updateMetaCache(metasReal, meta);
MetaData meta = lib.imprt(url, pgImprt);
updateMetaCache(metasReal, meta);
- synchronized (metasLock) {
- metasMixed = null;
- }
+ metasMixed = null;
clearFromCache(meta.getLuid());
clearFromCache(meta.getLuid());
@@
-418,7
+419,7
@@
public class CacheLibrary extends BasicLibrary {
// BasicLibrary:
@Override
// BasicLibrary:
@Override
- protected
int
getNextId() {
+ protected
String
getNextId() {
throw new java.lang.InternalError("Should not have been called");
}
throw new java.lang.InternalError("Should not have been called");
}