Reputation: 2605
I am using Hazelcast distributed map in one of my project. Do I need to use Hazelcast lock explicitly when updating a key from multiple nodes or will it be taken care by Hazelcast implicitly, since Hazelcast docs say IMap is thread safe.
Upvotes: 0
Views: 735
Reputation: 6104
It will take care of it. Every single key always has just one internal thread mutating it and therefore is implicit thread-safe. However if you have multiple operations like get+mutation+put you'll leave the thread-safety. In this cases an EntryProcessor might help you.
Upvotes: 2