com.hazelcast.cluster.impl
Constructor and Description |
---|
ClusterProxy(ClusterServiceImpl clusterService) |
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.
|
public ClusterProxy(ClusterServiceImpl clusterService)
public Member getLocalMember()
Cluster
getLocalMember
in interface Cluster
public Set<Member> getMembers()
Cluster
getMembers
in interface Cluster
public long getClusterTime()
Cluster
getClusterTime
in interface Cluster
public String addMembershipListener(MembershipListener listener)
Cluster
Cluster.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.addMembershipListener
in interface Cluster
listener
- membership listenerCluster.removeMembershipListener(String)
public boolean removeMembershipListener(String registrationId)
Cluster
removeMembershipListener
in interface Cluster
registrationId
- the registrationId of MembershipListener to remove.Cluster.addMembershipListener(MembershipListener)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.