Listeners notified on map events

A local listener implies that only listeners bound on the owning instance node of a partition will be notified of the relevant map events.

<map name="default">
 <entry-listeners>
  <entry-listener include-value="true" local="false">
   com.packtpub.hazelcast.listeners.MapEntryListener
  </entry-listener>
 </entry-listeners>
</map>

config.getMapConfig("default")
 .addEntryListenerConfig(new EntryListenerConfig(
  MapEntryListener.class.getCanonicalName(),
  false, true
 ));

Get Getting Started with Hazelcast - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.