com.hazelcast.cluster
Class ClusterProxy

java.lang.Object
  extended by com.hazelcast.cluster.ClusterProxy
All Implemented Interfaces:
Cluster

public class ClusterProxy
extends Object
implements Cluster

Author:
mdogan 8/26/12

Constructor Summary
ClusterProxy(ClusterServiceImpl clusterService)
           
 
Method Summary
 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 current members of the cluster.
 boolean removeMembershipListener(String registrationId)
          Removes the specified membership listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterProxy

public ClusterProxy(ClusterServiceImpl clusterService)
Method Detail

getLocalMember

public Member getLocalMember()
Description copied from interface: Cluster
Returns this Hazelcast instance member

Specified by:
getLocalMember in interface Cluster
Returns:
this Hazelcast instance member

getMembers

public Set<Member> getMembers()
Description copied from interface: Cluster
Set of current members of the cluster. Returning set instance is not modifiable. Every member in the cluster has the same member list in the same order. First member is the oldest member.

Specified by:
getMembers in interface Cluster
Returns:
current members of the cluster

getClusterTime

public long getClusterTime()
Description copied from interface: Cluster
Returns the cluster-wide time in milliseconds.

Cluster tries to keep a cluster-wide time which is might be different than the member's own system time. Cluster-wide time is -almost- the same on all members of the cluster.

Specified by:
getClusterTime in interface Cluster
Returns:
cluster-wide time

addMembershipListener

public String addMembershipListener(MembershipListener listener)
Description copied from interface: Cluster
Adds MembershipListener to listen for membership updates. If the MembershipListener implements the InitialMembershipListener interface, it will also receive the InitialMembershipEvent.

Specified by:
addMembershipListener in interface Cluster
Parameters:
listener - membership listener
Returns:
returns registration id.

removeMembershipListener

public boolean removeMembershipListener(String registrationId)
Description copied from interface: Cluster
Removes the specified membership listener.

Specified by:
removeMembershipListener in interface Cluster
Parameters:
registrationId - Id of listener registration.
Returns:
true if registration is removed, false otherwise


Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.