Book Image

Getting Started with Hazelcast

By : Matthew Johns
Book Image

Getting Started with Hazelcast

By: Matthew Johns

Overview of this book

Table of Contents (18 chapters)
Getting Started with Hazelcast
About the Author
About the Reviewers

Listening to the goings-on

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. To allow us to register an interest in events, the listener concept is borrowed from Java. In that way, there are a number of listener interfaces that we can implement to receive, process, and handle different types of events; one of which we have previously encountered.

  • Collection listeners

    • EntryListener for map-based (IMap and MultiMap) events

    • ItemListener for flat collection-based (IList, ISet, and IQueue) events

    • MessageListener for receiving topic events, but as we've seen before, it is used as part of the standard operation of topics

  • Cluster listeners

    • InstanceListener for collection, creation, and destruction events

    • MembershipListener for cluster membership events

    • LifecycleListener for local node state events

    • MigrationListener for partition migration state events