Gets a remove/evicted event fired on hazelcast #addLocalEntryListener if a member joins a cluster?

658 views Asked by At

From the docs:

Note that entries in distributed map are partitioned across the cluster members; each member owns and manages the some portion of the entries. Owned entries are called local entries. This listener will be listening for the events of local entries. Let's say your cluster has member1 and member2. On member2 you added a local listener and from member1, you call map.put(key2, value2). If the key2 is owned by member2 then the local listener will be notified for the add/update event. Also note that entries can migrate to other nodes for load balancing and/or membership change.

Does the last sentence mean, that if a member joins a cluster and a key will moved to a new node an "EntryRemoved" event is fired on the local node (means the local node is now not the owner node any more)? And can I trust on this behavior?

1

There are 1 answers

0
ali On BEST ANSWER

No, EntryRemoved event is fired only when you explicitly remove the entry.