You can add event listeners to a Hazelcast Java client. You can configure the following listeners to listen to the events on the client side. Please see the respective sections under the Cluster and Distributed Object Events sections for example codes.
- Lifecycle Listener: Notifies when the client is starting, started, shutting down, and shutdown.
- Membership Listener: Notifies when a member joins to/leaves the cluster to which the client is connected, or when an attribute is changed in a member.
- DistributedObject Listener: Notifies when a distributed object is created or destroyed throughout the cluster to which the client is connected.
Please refer to the Client Listenerconfig section for more information.