One great feature of Hazelcast is its ability to notify us of the goings-on of our persisted data and the cluster as a whole, allowing us to register an interest in events. The listener concept is borrowed from Java. So, you should feel pretty familiar with it. To provide this, there are a number of listener interfaces that we can implement to receive, process, and handle different types of events—one of which we previously encountered. The following are the listener interfaces:
Collection listeners:
EntryListener
is used for map-based (IMap
andMultiMap
) eventsItemListener
is used for flat collection-based (IList
,ISet
, andIQueue
) eventsMessageListener
is used to receive topic events, but as we've seen before, it is used as a part of the standard operation of topicsQuorumListener
is used for quorum state change events
Cluster listeners: