Map.Entry<Object, CacheEntry> e = it.next();
CacheEntry entry = e.getValue();
Object key = e.getKey();
boolean needToUnlock = possiblyLocked(entry);
// could be null with read-committed
if (entry != null && entry.isChanged()) entry.rollback();
else {
if (trace) log.tracef("Entry for key %s is null, not calling rollbackUpdate", key);
}
// and then unlock
if (needToUnlock) {