* Matching items are removed from the cache.
*
* @param items items updated
*/
public void itemsUpdated(Collection items) {
ReadLock lock = acquireReadLock();
try {
synchronized (versionItems) {
Iterator iter = items.iterator();
while (iter.hasNext()) {
InternalVersionItem item = (InternalVersionItem) iter.next();
InternalVersionItem cached = (InternalVersionItem) versionItems.remove(item.getId());
if (cached != null) {
if (cached instanceof InternalVersionHistoryImpl) {
InternalVersionHistoryImpl vh = (InternalVersionHistoryImpl) cached;
try {
vh.reload();
versionItems.put(vh.getId(), vh);
} catch (RepositoryException e) {
log.warn("Unable to update version history: " + e.toString());
}
}
}
}
}
} finally {
lock.release();
}
}