Q:

Can i add a listener to an individual  pair in Hazelcast?

I'm aware that Hazelcast has the functionality to add EntryListener to a map (IMap) that I am updating such that i receive messages based on activity to the whole map. 
However I want to know if it is possible to add a listener to an individual key and its value. I.e. a listener to one entry of the map, not the whole map.
Thanks

A:

You have two different options. You can register an MapListener to a specific key or you can define a Predicate.
IMap::addEntryListener(MapListener, Key, boolean)
IMap::addEntryListener(MapListener, Predicate, boolean)

http://docs.hazelcast.org/docs/3.6/javadoc/com/hazelcast/core/IMap.html#addEntryListener(com.hazelcast.core.EntryListener,%20K,%20boolean)
http://docs.hazelcast.org/docs/3.6/javadoc/com/hazelcast/core/IMap.html#addEntryListener(com.hazelcast.core.EntryListener,%20com.hazelcast.query.Predicate,%20boolean)

