类 ServiceInfo
java.lang.Object
com.alibaba.nacos.api.naming.pojo.ServiceInfo
ServiceInfo.
- 作者:
- nkorange, shizhengxing
-
字段概要
字段 -
构造器概要
构造器构造器说明ServiceInfo(String key)There is only one form of the key:groupName@@name@clusters.ServiceInfo(String name, String clusters) -
方法概要
修饰符和类型方法说明voidaddAllHosts(List<? extends Instance> hosts)voidbooleanexpired()static ServiceInfoGetServiceInfofrom key.longgetHosts()getKey()static StringlonggetName()intipCount()booleanisAllIPs()booleanbooleanisValid()voidsetAllIPs(boolean allIPs)voidsetCacheMillis(long cacheMillis)voidsetChecksum(String checksum)voidsetClusters(String clusters)voidsetGroupName(String groupName)voidvoidsetJsonFromServer(String jsonFromServer)voidsetLastRefTime(long lastRefTime)voidvoidsetReachProtectionThreshold(boolean reachProtectionThreshold)toString()booleanvalidate()Judge whether service info is validate.
-
字段详细资料
-
SPLITER
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
ServiceInfo
public ServiceInfo() -
ServiceInfo
There is only one form of the key:groupName@@name@clusters. This constuctor used by DiskCache.read(String) and FailoverReactor.FailoverFileReader,you should know that 'groupName' must not be null,and 'clusters' can be null. -
ServiceInfo
-
-
方法详细资料
-
isAllIPs
public boolean isAllIPs() -
setAllIPs
public void setAllIPs(boolean allIPs) -
ipCount
public int ipCount() -
expired
public boolean expired() -
setHosts
-
addHost
-
addAllHosts
-
getHosts
-
isValid
public boolean isValid() -
getName
-
setName
-
getGroupName
-
setGroupName
-
setLastRefTime
public void setLastRefTime(long lastRefTime) -
getLastRefTime
public long getLastRefTime() -
getClusters
-
setClusters
-
getCacheMillis
public long getCacheMillis() -
setCacheMillis
public void setCacheMillis(long cacheMillis) -
validate
public boolean validate()Judge whether service info is validate.- 返回:
- true if validate, otherwise false
-
getJsonFromServer
-
setJsonFromServer
-
getKey
-
getKey
-
getKeyEncoded
-
fromKey
GetServiceInfofrom key.- 参数:
key- key of service info- 返回:
- new service info
-
toString
-
getChecksum
-
setChecksum
-
isReachProtectionThreshold
public boolean isReachProtectionThreshold() -
setReachProtectionThreshold
public void setReachProtectionThreshold(boolean reachProtectionThreshold)
-