According to the Hazelcast documentation, the TTL for an IMap can either be defined in the xml map element or, when an element is inserted into the map, TTL can be passed as a numeric argument, followed by the appropriate TimeUnit.
Assuming the map has TTL = 1 day in xml, and an element inserted in it has TTL = 1 hour, which TTL will actually be used?
myMap.put( "1", "John", 50, TimeUnit.SECONDS )
has higher priority.