localModeWriteSkewCheck = configuration.locking().writeSkewCheck();
}
@Override
public final CacheEntry wrapEntryForReading(InvocationContext ctx, Object key) throws InterruptedException {
CacheEntry cacheEntry = getFromContext(ctx, key);
if (cacheEntry == null) {
cacheEntry = getFromContainer(key);
// do not bother wrapping though if this is not in a tx. repeatable read etc are all meaningless unless there is a tx.
if (useRepeatableRead) {
MVCCEntry mvccEntry;
if (cacheEntry == null) {
mvccEntry = createWrappedEntry(key, null, null, false, false, -1);
} else {
mvccEntry = createWrappedEntry(key, cacheEntry.getValue(), cacheEntry.getVersion(), false, false, cacheEntry.getLifespan());
// If the original entry has changeable state, copy state flags to the new MVCC entry.
if (cacheEntry instanceof StateChangingEntry && mvccEntry != null)
mvccEntry.copyStateFlagsFrom((StateChangingEntry) cacheEntry);
}