Hazelcast cluster interface. It provides access to the members in the cluster and one can register for changes in the cluster members.
Adds MembershipListener to listen for membership updates.
The addMembershipListener method returns a register ID. This ID is needed to remove the MembershipListener using the removeMembershipListener method.
There is no check for duplicate registrations, so if you register the listener twice, it will get events twice.
the registration ID
List of the current members in the cluster.
Every member in the cluster returns the 'members' in the same order. To obtain the oldest member (the master) in the cluster, you can retrieve the first item in the list.
optional MemberSelector instance to filter members to return. If not provided, the returned list will contain all the available cluster members.
current members in the cluster
Removes the specified MembershipListener.
If the same MembershipListener is registered multiple times, it needs to be removed multiple times.
This method can safely be called multiple times for the same registration ID; subsequent calls are ignored.
the registration ID of MembershipListener to remove
true if the registration is removed, false otherwise
Generated using TypeDoc