checkTransactionState();
TxnValueWrapper wrapper = txMap.get(key);
MapService service = getService();
final MapServiceContext mapServiceContext = service.getMapServiceContext();
if (wrapper != null && !mapServiceContext.compare(name, wrapper.value, value)) {
return false;
}
boolean removed = removeIfSameInternal(mapServiceContext.toData(key, partitionStrategy), value);
if (removed) {
txMap.put(key, new TxnValueWrapper(value, TxnValueWrapper.Type.REMOVED));