类 DefaultServiceInstance
- java.lang.Object
-
- org.apache.dubbo.registry.client.DefaultServiceInstance
-
- 所有已实现的接口:
Serializable,ServiceInstance
public class DefaultServiceInstance extends Object implements ServiceInstance
The default implementation ofServiceInstance.- 从以下版本开始:
- 2.7.5
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classDefaultServiceInstance.Endpoint
-
构造器概要
构造器 构造器 说明 DefaultServiceInstance()DefaultServiceInstance(String serviceName, String host, Integer port, ApplicationModel applicationModel)DefaultServiceInstance(String serviceName, ApplicationModel applicationModel)DefaultServiceInstance(DefaultServiceInstance other)
-
方法概要
-
从接口继承的方法 org.apache.dubbo.registry.client.ServiceInstance
getMetadata, getMetadata, getOrDefaultApplicationModel
-
-
-
-
构造器详细资料
-
DefaultServiceInstance
public DefaultServiceInstance()
-
DefaultServiceInstance
public DefaultServiceInstance(DefaultServiceInstance other)
-
DefaultServiceInstance
public DefaultServiceInstance(String serviceName, String host, Integer port, ApplicationModel applicationModel)
-
DefaultServiceInstance
public DefaultServiceInstance(String serviceName, ApplicationModel applicationModel)
-
-
方法详细资料
-
setRawAddress
public void setRawAddress(String rawAddress)
-
setServiceName
public void setServiceName(String serviceName)
-
setHost
public void setHost(String host)
-
getServiceName
public String getServiceName()
从接口复制的说明:ServiceInstanceThe name of service that current instance belongs to.- 指定者:
getServiceName在接口中ServiceInstance- 返回:
- non-null
-
getHost
public String getHost()
从接口复制的说明:ServiceInstanceThe hostname of the registered service instance.- 指定者:
getHost在接口中ServiceInstance- 返回:
- non-null
-
setPort
public void setPort(int port)
-
getPort
public int getPort()
从接口复制的说明:ServiceInstanceThe port of the registered service instance.- 指定者:
getPort在接口中ServiceInstance- 返回:
- the positive integer if present
-
getAddress
public String getAddress()
- 指定者:
getAddress在接口中ServiceInstance
-
isEnabled
public boolean isEnabled()
从接口复制的说明:ServiceInstanceThe enabled status of the registered service instance.- 指定者:
isEnabled在接口中ServiceInstance- 返回:
- if
true, indicates current instance is enabled, or disable, the client should remove this one. The default value istrue
-
setEnabled
public void setEnabled(boolean enabled)
-
isHealthy
public boolean isHealthy()
从接口复制的说明:ServiceInstanceThe registered service instance is health or not.- 指定者:
isHealthy在接口中ServiceInstance- 返回:
- if
true, indicates current instance is healthy, or unhealthy, the client may ignore this one. The default value istrue
-
setHealthy
public void setHealthy(boolean healthy)
-
getMetadata
public Map<String,String> getMetadata()
从接口复制的说明:ServiceInstanceThe key / value pair metadata associated with the service instance.- 指定者:
getMetadata在接口中ServiceInstance- 返回:
- non-null, mutable and unsorted
Map
-
getSortedMetadata
public SortedMap<String,String> getSortedMetadata()
- 指定者:
getSortedMetadata在接口中ServiceInstance
-
getRegistryCluster
public String getRegistryCluster()
- 指定者:
getRegistryCluster在接口中ServiceInstance
-
setRegistryCluster
public void setRegistryCluster(String registryCluster)
- 指定者:
setRegistryCluster在接口中ServiceInstance
-
getExtendParams
public Map<String,String> getExtendParams()
- 指定者:
getExtendParams在接口中ServiceInstance
-
getExtendParam
public String getExtendParam(String key)
- 指定者:
getExtendParam在接口中ServiceInstance
-
putExtendParam
public String putExtendParam(String key, String value)
- 指定者:
putExtendParam在接口中ServiceInstance
-
putExtendParamIfAbsent
public String putExtendParamIfAbsent(String key, String value)
- 指定者:
putExtendParamIfAbsent在接口中ServiceInstance
-
removeExtendParam
public String removeExtendParam(String key)
- 指定者:
removeExtendParam在接口中ServiceInstance
-
setEndpoints
public void setEndpoints(List<DefaultServiceInstance.Endpoint> endpoints)
-
getEndpoints
public List<DefaultServiceInstance.Endpoint> getEndpoints()
-
copyFrom
public DefaultServiceInstance copyFrom(DefaultServiceInstance.Endpoint endpoint)
-
getAllParams
public Map<String,String> getAllParams()
- 指定者:
getAllParams在接口中ServiceInstance
-
setApplicationModel
public void setApplicationModel(ApplicationModel applicationModel)
- 指定者:
setApplicationModel在接口中ServiceInstance
-
getApplicationModel
public ApplicationModel getApplicationModel()
- 指定者:
getApplicationModel在接口中ServiceInstance
-
getServiceMetadata
public MetadataInfo getServiceMetadata()
- 指定者:
getServiceMetadata在接口中ServiceInstance
-
setServiceMetadata
public void setServiceMetadata(MetadataInfo serviceMetadata)
- 指定者:
setServiceMetadata在接口中ServiceInstance
-
toURL
public InstanceAddressURL toURL(String protocol)
- 指定者:
toURL在接口中ServiceInstance
-
toFullString
public String toFullString()
-
-