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