类 ServiceInfo

java.lang.Object
com.alibaba.nacos.api.naming.pojo.ServiceInfo

public class ServiceInfo extends Object
ServiceInfo.
作者:
nkorange, shizhengxing
  • 字段详细资料

  • 构造器详细资料

    • ServiceInfo

      public ServiceInfo()
    • ServiceInfo

      public ServiceInfo(String key)
      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

      public ServiceInfo(String name, String clusters)
  • 方法详细资料

    • isAllIPs

      public boolean isAllIPs()
    • setAllIPs

      public void setAllIPs(boolean allIPs)
    • ipCount

      public int ipCount()
    • expired

      public boolean expired()
    • setHosts

      public void setHosts(List<Instance> hosts)
    • addHost

      public void addHost(Instance host)
    • addAllHosts

      public void addAllHosts(List<? extends Instance> hosts)
    • getHosts

      public List<Instance> getHosts()
    • isValid

      public boolean isValid()
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getGroupName

      public String getGroupName()
    • setGroupName

      public void setGroupName(String groupName)
    • setLastRefTime

      public void setLastRefTime(long lastRefTime)
    • getLastRefTime

      public long getLastRefTime()
    • getClusters

      public String getClusters()
    • setClusters

      public void setClusters(String clusters)
    • 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

      public String getJsonFromServer()
    • setJsonFromServer

      public void setJsonFromServer(String jsonFromServer)
    • getKey

      public String getKey()
    • getKey

      public static String getKey(String name, String clusters)
    • getKeyEncoded

      public String getKeyEncoded()
    • fromKey

      public static ServiceInfo fromKey(String key)
      Get ServiceInfo from key.
      参数:
      key - key of service info
      返回:
      new service info
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • getChecksum

      public String getChecksum()
    • setChecksum

      public void setChecksum(String checksum)
    • isReachProtectionThreshold

      public boolean isReachProtectionThreshold()
    • setReachProtectionThreshold

      public void setReachProtectionThreshold(boolean reachProtectionThreshold)