}
@Override
protected MVCCEntry createWrappedEntry(Object key, CacheEntry cacheEntry,
Metadata providedMetadata, boolean isForInsert, boolean forRemoval) {
Metadata metadata;
Object value;
if (cacheEntry != null) {
value = cacheEntry.getValue();
Metadata entryMetadata = cacheEntry.getMetadata();
if (providedMetadata != null && entryMetadata != null) {
metadata = providedMetadata.builder().read(entryMetadata).build();
} else if (providedMetadata == null) {
metadata = entryMetadata; // take the metadata in memory
} else {