- @Override
- public synchronized MetaData getInfo(String luid) throws IOException {
- MetaData info = cacheLib.getInfo(luid);
- if (info == null) {
- info = lib.getInfo(luid);
+ metasMixed = new ArrayList<MetaData>();
+ TreeSet<String> cachedLuids = new TreeSet<String>();
+ for (MetaData cachedMeta : cacheLib.getMetas(null)) {
+ metasMixed.add(cachedMeta);
+ cachedLuids.add(cachedMeta.getLuid());
+ }
+ for (MetaData realMeta : metasReal) {
+ if (!cachedLuids.contains(realMeta.getLuid())) {
+ metasMixed.add(realMeta);
+ }
+ }
+ }