public class ClientClusterServiceImpl extends ClusterListenerSupport
ClientClusterService
implementation.client
Constructor and Description |
---|
ClientClusterServiceImpl(HazelcastClientInstanceImpl client,
Collection<AddressProvider> addressProviders) |
Modifier and Type | Method and Description |
---|---|
String |
addMembershipListener(MembershipListener listener) |
long |
getClusterTime()
Returns the cluster-time.
|
Client |
getLocalClient() |
Address |
getMasterAddress()
Returns the address of the master member.
|
Member |
getMember(Address address)
Gets the member for the given address.
|
Member |
getMember(String uuid)
Gets the member with the given uuid.
|
Collection<Member> |
getMemberList()
Gets the collection of members.
|
Collection<Member> |
getMembers(MemberSelector selector)
Returns a collection of the members that satisfy the given
MemberSelector . |
int |
getSize()
Gets the current number of members.
|
int |
getSize(MemberSelector selector)
Gets the number of members that satisfy the given
MemberSelector instance. |
boolean |
removeMembershipListener(String registrationId) |
void |
start() |
connectionAdded, connectionRemoved, connectToCluster, getOwnerConnectionAddress, getPrincipal, heartBeatStarted, heartBeatStopped, init, shutdown
public ClientClusterServiceImpl(HazelcastClientInstanceImpl client, Collection<AddressProvider> addressProviders)
public Member getMember(Address address)
ClientClusterService
address
- The address of the member to look up.public Member getMember(String uuid)
ClientClusterService
uuid
- The uuid of the member.public Collection<Member> getMemberList()
ClientClusterService
public Collection<Member> getMembers(MemberSelector selector)
ClientClusterService
MemberSelector
.selector
- MemberSelector
instance to filter members to returnMemberSelector
.public Address getMasterAddress()
ClientClusterService
public int getSize()
ClientClusterService
public int getSize(MemberSelector selector)
ClientClusterService
MemberSelector
instance.selector
- MemberSelector
instance that filters members to be counted.MemberSelector
instance.public long getClusterTime()
ClientClusterService
public Client getLocalClient()
public String addMembershipListener(MembershipListener listener)
listener
- The listener to be registered.public boolean removeMembershipListener(String registrationId)
registrationId
- The registrationId of the listener to be removed.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.