Source:
public boolean merge(MapMergeTypes mergingEntry, SplitBrainMergePolicy<Data, MapMergeTypes> mergePolicy, CallerProvenance provenance) { checkIfLoaded(); long now = getNow(); serializationService.getManagedContext().initialize(mergingEntry); serializationService.getManagedContext().initialize(mergePolicy); Data key = mergingEntry.getKey(); Record record = getRecordOrNull(key, now, false); Object newValue; Object oldValue = null; if (record == null) { newValue = mergePolicy.merge(mergingEntry, null); if (newValue == null) { return false; } record = createRecord(key, newValue, UNSET, UNSET, now); mergeRecordExpiration(record, mergingEntry); if (persistenceEnabledFor(provenance)) { runMapStore(record, key, newValue, now, null); } storage.put(key, record); mutationObserver.onPutRecord(key, record); } else { oldValue = record.getValue(); MapMergeTypes existingEntry = createMergingEntry(serializationService, record); newValue = mergePolicy.merge(mergingEntry, existingEntry); if (newValue == null) { removeIndex(record); if (persistenceEnabledFor(provenance)) { mapDataStore.remove(key, now, null); } onStore(record); mutationObserver.onRemoveRecord(key, record); storage.removeRecord(record); return true; } if (valueComparator.isEqual(newValue, oldValue, serializationService)) { mergeRecordExpiration(record, mergingEntry); return true; } newValue = persistenceEnabledFor(provenance) ? mapDataStore.add(key, newValue, record.getExpirationTime(), now, null) : newValue; onStore(record); mutationObserver.onUpdateRecord(key, record, newValue); storage.updateRecordValue(key, record, newValue); } saveIndex(record, oldValue); return newValue != null; }

Target:
public boolean merge(MapMergeTypes mergingEntry, SplitBrainMergePolicy<Data, MapMergeTypes> mergePolicy, CallerProvenance provenance) { checkIfLoaded(); long now = getNow(); serializationService.getManagedContext().initialize(mergingEntry); serializationService.getManagedContext().initialize(mergePolicy); Data key = mergingEntry.getKey(); Record record = getRecordOrNull(key, now, false); Object newValue; Object oldValue = null; if (record == null) { newValue = mergePolicy.merge(mergingEntry, null); if (newValue == null) { return false; } record = createRecord(key, newValue, UNSET, UNSET, now); mergeRecordExpiration(record, mergingEntry); if (persistenceEnabledFor(provenance)) { putIntoMapStore(record, key, newValue, now, null); } storage.put(key, record); mutationObserver.onPutRecord(key, record, null, false); } else { oldValue = record.getValue(); MapMergeTypes existingEntry = createMergingEntry(serializationService, record); newValue = mergePolicy.merge(mergingEntry, existingEntry); if (newValue == null) { if (persistenceEnabledFor(provenance)) { mapDataStore.remove(key, now, null); } onStore(record); mutationObserver.onRemoveRecord(key, record); storage.removeRecord(record); return true; } if (valueComparator.isEqual(newValue, oldValue, serializationService)) { mergeRecordExpiration(record, mergingEntry); return true; } newValue = persistenceEnabledFor(provenance) ? mapDataStore.add(key, newValue, record.getExpirationTime(), now, null) : newValue; onStore(record); mutationObserver.onUpdateRecord(key, record, oldValue, newValue, false); storage.updateRecordValue(key, record, newValue); } return newValue != null; }