public interface ClusterService extends CoreService, Cluster
Cluster interface.| Modifier and Type | Method and Description |
|---|---|
ClusterClock |
getClusterClock()
Returns the
ClusterClock of the cluster. |
String |
getClusterId()
Returns UUID for the cluster.
|
Member |
getLocalMember()
Gets the local member instance.
|
Address |
getMasterAddress()
Returns the address of the master member.
|
MemberImpl |
getMember(Address address)
Gets the member for the given address.
|
MemberImpl |
getMember(String uuid)
Gets the member with the given uuid.
|
Collection<MemberImpl> |
getMemberImpls()
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. |
Address |
getThisAddress()
Gets the address of this member.
|
boolean |
isJoined()
Returns whether this member joined to a cluster.
|
boolean |
isMaster()
Checks if this member is the master.
|
addMembershipListener, changeClusterState, changeClusterState, changeClusterVersion, changeClusterVersion, getClusterState, getClusterTime, getClusterVersion, getHotRestartService, getMembers, promoteLocalLiteMember, removeMembershipListener, shutdown, shutdownMemberImpl getMember(Address address)
address - the address of the member to lookup.MemberImpl getMember(String uuid)
uuid - the uuid of the memberCollection<MemberImpl> getMemberImpls()
Collection<Member> getMembers(MemberSelector selector)
MemberSelector.selector - MemberSelector instance to filter members to returnMemberSelector.Address getMasterAddress()
boolean isMaster()
boolean isJoined()
Address getThisAddress()
Member getLocalMember()
The returned value will never be null, but it may change when local lite member is promoted to a data member
via Cluster.promoteLocalLiteMember()
or when this member merges to a new cluster after split-brain detected. Returned value should not be
cached but instead this method should be called each time when local member is needed.
getLocalMember in interface Clusterint getSize()
int getSize(MemberSelector selector)
MemberSelector instance.selector - MemberSelector instance that filters members to be counted.MemberSelector instance.ClusterClock getClusterClock()
ClusterClock of the cluster.
The returned value will never be null and will never change.String getClusterId()
Copyright © 2017. All Rights Reserved.