public class ClientClusterServiceImpl extends Object implements ClientClusterService
ClientClusterService
implementation.Modifier and Type | Field and Description |
---|---|
protected HazelcastClientInstanceImpl |
client |
Constructor and Description |
---|
ClientClusterServiceImpl(HazelcastClientInstanceImpl client) |
Modifier and Type | Method and Description |
---|---|
String |
addMembershipListener(MembershipListener listener) |
void |
cleanupOnDisconnect() |
void |
clearMemberList() |
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. |
void |
listenMembershipEvents(Connection ownerConnection) |
boolean |
removeMembershipListener(String registrationId) |
void |
reset() |
void |
shutdown() |
void |
start() |
protected final HazelcastClientInstanceImpl client
public ClientClusterServiceImpl(HazelcastClientInstanceImpl client)
public Member getMember(Address address)
ClientClusterService
getMember
in interface ClientClusterService
address
- The address of the member to look up.public Member getMember(String uuid)
ClientClusterService
getMember
in interface ClientClusterService
uuid
- The UUID of the member.public Collection<Member> getMemberList()
ClientClusterService
getMemberList
in interface ClientClusterService
public Collection<Member> getMembers(MemberSelector selector)
ClientClusterService
MemberSelector
.getMembers
in interface ClientClusterService
selector
- MemberSelector
instance to filter members to returnMemberSelector
.public Address getMasterAddress()
ClientClusterService
getMasterAddress
in interface ClientClusterService
public int getSize()
ClientClusterService
getSize
in interface ClientClusterService
public int getSize(MemberSelector selector)
ClientClusterService
MemberSelector
instance.getSize
in interface ClientClusterService
selector
- MemberSelector
instance that filters members to be counted.MemberSelector
instance.public long getClusterTime()
ClientClusterService
getClusterTime
in interface ClientClusterService
public Client getLocalClient()
getLocalClient
in interface ClientClusterService
public String addMembershipListener(MembershipListener listener)
addMembershipListener
in interface ClientClusterService
listener
- The listener to be registered.public boolean removeMembershipListener(String registrationId)
removeMembershipListener
in interface ClientClusterService
registrationId
- The registrationId of the listener to be removed.public void listenMembershipEvents(Connection ownerConnection) throws Exception
Exception
public void cleanupOnDisconnect()
public void clearMemberList()
public void start()
public void shutdown()
public void reset()
reset
in interface ClientClusterService
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.