com.hazelcast.core
public interface Cluster
Modifier and Type | Method and Description |
---|---|
String |
addMembershipListener(MembershipListener listener)
Adds MembershipListener to listen for membership updates.
|
long |
getClusterTime()
Returns the cluster-wide time in milliseconds.
|
Member |
getLocalMember()
Returns this Hazelcast instance member.
|
Set<Member> |
getMembers()
Set of the current members in the cluster.
|
boolean |
removeMembershipListener(String registrationId)
Removes the specified MembershipListener.
|
String addMembershipListener(MembershipListener listener)
removeMembershipListener(String)
method.
If the MembershipListener implements the InitialMembershipListener
interface, it will also receive
the InitialMembershipEvent
.
There is no check for duplicate registrations, so if you register the listener twice, it will get events twice.listener
- membership listenerNullPointerException
- if listener is null.removeMembershipListener(String)
boolean removeMembershipListener(String registrationId)
registrationId
- the registrationId of MembershipListener to remove.NullPointerException
- if the registration id is null.addMembershipListener(MembershipListener)
Set<Member> getMembers()
Member getLocalMember()
long getClusterTime()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.