public interface ClusterService extends CoreService, Cluster
This API is an internal API; the end user will use the 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.
|
int |
getMemberListVersion()
Returns the current version of member list.
|
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, shutdown
MemberImpl getMember(Address address)
address
- the address of the member to lookupnull
if not found (if the address is null
, null
is returned)MemberImpl getMember(String uuid)
uuid
- the UUID of the membernull
if not found (if the UUID is null
, null
is returned)Collection<MemberImpl> getMemberImpls()
If we take care of the generics.
null
)Collection<Member> getMembers(MemberSelector selector)
MemberSelector
.selector
- MemberSelector
instance to filter members to returnMemberSelector
Address getMasterAddress()
null
if the master is not yet known)boolean isMaster()
true
if master, false
otherwiseboolean isJoined()
true
if this member is joined to a cluster, false
otherwiseAddress getThisAddress()
null
)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 Cluster
null
)int getSize()
int getSize(MemberSelector selector)
MemberSelector
instance.selector
- MemberSelector
instance that filters members to be countedMemberSelector
instanceClusterClock getClusterClock()
ClusterClock
of the cluster.
The returned value will never be null
and will never change.
String getClusterId()
int getMemberListVersion()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.