user998692
user998692

Reputation: 5256

TTL priorities for Hazelcast IMap

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?

Upvotes: 1

Views: 189

Answers (1)

Bilal Yasar
Bilal Yasar

Reputation: 967

myMap.put( "1", "John", 50, TimeUnit.SECONDS ) has higher priority.

Upvotes: 3

Related Questions