// Perform a write skew check on each entry.
EntryVersionsMap uv = new EntryVersionsMap();
for (WriteCommand c : prepareCommand.getModifications()) {
for (Object k : c.getAffectedKeys()) {
ClusteredRepeatableReadEntry entry = (ClusteredRepeatableReadEntry) context.lookupEntry(k);
if (entry.performWriteSkewCheck(dataContainer)) {
IncrementableEntryVersion newVersion = entry.isCreated() ? versionGenerator.generateNew() : versionGenerator.increment((IncrementableEntryVersion) entry.getVersion());
uv.put(k, newVersion);
} else {
// Write skew check detected!
throw new CacheException("Write skew detected on key " + k + " for transaction " + context.getTransaction());