类 ServerMemberManager
- 所有已实现的接口:
EventListener,org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
init() Cluster node manager initialization shutdown() The
cluster node manager is down getSelf() Gets local node information getServerList() Gets the cluster node dictionary getMemberAddressInfos()
Gets the address information of the healthy member node allMembers() Gets a list of
member information objects allMembersWithoutSelf() Gets a list of cluster member nodes
with the exception of this node hasMember(String) Is there a node memberChange(Collection) The final node list changes the method, making the full size more
memberJoin(Collection) Node join, can automatically trigger memberLeave(Collection) When the node leaves, only the interface call can be manually triggered
update(Member) Update the target node information isUnHealth(String) Whether the target node is healthy initAndStartLookup() Initializes the addressing mode
- 作者:
- liaochuntao
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明return this cluster all members.return this cluster all members without self.com.alibaba.nacos.core.cluster.ServerMemberManager.MemberInfoReportTaskgetSelf()booleanWhether the node exists within the cluster.protected voidinit()booleanstatic booleanbooleanisUnHealth(String address)this memberMember.getState()is health.static booleanbooleanmemberJoin(Collection<Member> members)members join this cluster.booleanmemberLeave(Collection<Member> members)members leave this cluster.voidonApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event)voidsetMemberAddressInfos(Set<String> memberAddressInfos)voidshutdown()ServerMemberManager shutdown.voidswitchLookup(String name)switch look up.booleanmember information update.voidupdateMember(Member member)
-
构造器详细资料
-
ServerMemberManager
- 抛出:
Exception
-
-
方法详细资料
-
init
protected void init() throws com.alibaba.nacos.api.exception.NacosException- 抛出:
com.alibaba.nacos.api.exception.NacosException
-
switchLookup
switch look up.- 参数:
name- look up name.- 抛出:
com.alibaba.nacos.api.exception.NacosException- exception.
-
isUseAddressServer
public static boolean isUseAddressServer() -
update
member information update.- 参数:
newMember-Member- 返回:
- update is successw
-
hasMember
Whether the node exists within the cluster.- 参数:
address- ip:port- 返回:
- is exist
-
getServerListUnhealth
-
getLookup
-
getSelf
-
find
-
allMembers
return this cluster all members.- 返回:
Collectionall member
-
allMembersWithoutSelf
return this cluster all members without self.- 返回:
Collectionall member without self
-
memberJoin
members join this cluster.- 参数:
members-Collectionnew members- 返回:
- is success
-
memberLeave
members leave this cluster.- 参数:
members-Collectionwait leave members- 返回:
- is success
-
isUnHealth
this memberMember.getState()is health.- 参数:
address- ip:port- 返回:
- is health
-
isFirstIp
public boolean isFirstIp() -
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event)- 指定者:
onApplicationEvent在接口中org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
-
shutdown
ServerMemberManager shutdown.- 抛出:
com.alibaba.nacos.api.exception.NacosException- NacosException
-
getMemberAddressInfos
-
updateMember
-
setMemberAddressInfos
-
getInfoReportTask
public com.alibaba.nacos.core.cluster.ServerMemberManager.MemberInfoReportTask getInfoReportTask() -
getServerList
-
isInIpList
public static boolean isInIpList()
-