public Object put(Object key, Object value, long ttl, TimeUnit timeUnit) {
checkTransactionState();
MapService service = getService();
final MapServiceContext mapServiceContext = service.getMapServiceContext();
final Object valueBeforeTxn = mapServiceContext.toObject(putInternal(mapServiceContext.toData(key, partitionStrategy),
mapServiceContext.toData(value), ttl, timeUnit));
TxnValueWrapper currentValue = txMap.get(key);
if (value != null) {
TxnValueWrapper wrapper = valueBeforeTxn == null
? new TxnValueWrapper(value, TxnValueWrapper.Type.NEW)