def put(self, key, value, ttl=-<NUM_LIT:1>):
check_not_none(key, "<STR_LIT>")<EOL>check_not_none(value, "<STR_LIT>")<EOL>return self._encode_invoke(transactional_map_put_codec, key=self._to_data(key),<EOL>value=self._to_data(value), ttl=to_millis(ttl))<EOL>
Transactional implementation of :func:`Map.put(key, value, ttl) <hazelcast.proxy.map.Map.put>`

The object to be put will be accessible only in the current transaction context till the transaction is
committed.

:param key: (object), the specified key.
:param value: (object), the value to associate with the key.
:param ttl: (int), maximum time in seconds for this entry to stay (optional).
:return: (object), previous value associated with key or ``None`` if there was no mapping for key.