public class DefaultServiceInstances extends Object implements ServiceInstances
| Constructor and Description |
|---|
DefaultServiceInstances(ServiceKey serviceKey,
List<Instance> instances) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Instance |
getInstance(Node node)
get instance by host and port
|
Instance |
getInstance(String id)
get instance by id
|
List<Instance> |
getInstances()
获取服务实例列表
|
Map<String,String> |
getMetadata()
获取服务元数据信息
|
String |
getNamespace()
获取名字空间
|
String |
getRevision()
获取唯一标识信息
|
String |
getService()
获取服务名
|
ServiceKey |
getServiceKey()
获取服务标识
|
int |
getTotalWeight()
获取服务实例总权重值
|
int |
hashCode() |
boolean |
isInitialized()
服务实例列表是否已经加载
|
public DefaultServiceInstances(ServiceKey serviceKey, List<Instance> instances)
public ServiceKey getServiceKey()
ServiceInstancesgetServiceKey in interface ServiceInstancespublic int getTotalWeight()
ServiceInstancesgetTotalWeight in interface ServiceInstancespublic List<Instance> getInstances()
ServiceInstancesgetInstances in interface ServiceInstancespublic boolean isInitialized()
ServiceInstancesisInitialized in interface ServiceInstancespublic String getRevision()
ServiceInstancesgetRevision in interface ServiceInstancespublic Instance getInstance(Node node)
ServiceInstancesgetInstance in interface ServiceInstancesnode - host and portpublic Instance getInstance(String id)
ServiceInstancesgetInstance in interface ServiceInstancesid - instanceIdpublic Map<String,String> getMetadata()
ServiceMetadatagetMetadata in interface ServiceMetadatapublic String getService()
ServicegetService in interface Servicepublic String getNamespace()
ServicegetNamespace in interface ServiceCopyright © 2023. All rights reserved.