public class ServiceInstancesWrap extends Object implements ServiceInstances
| Constructor and Description |
|---|
ServiceInstancesWrap(ServiceInstances serviceInstances,
List<Instance> instances,
int totalWeight) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
List<Instance> |
getAllInstances() |
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()
服务实例列表是否已经加载
|
void |
reloadTotalWeight() |
void |
setInstances(List<Instance> instances) |
String |
toString() |
public ServiceInstancesWrap(ServiceInstances serviceInstances, List<Instance> instances, int totalWeight)
public ServiceKey getServiceKey()
ServiceInstancesgetServiceKey in interface ServiceInstancespublic int getTotalWeight()
ServiceInstancesgetTotalWeight in interface ServiceInstancespublic void reloadTotalWeight()
public 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 String getService()
ServicegetService in interface Servicepublic String getNamespace()
ServicegetNamespace in interface Servicepublic Map<String,String> getMetadata()
ServiceMetadatagetMetadata in interface ServiceMetadataCopyright © 2024. All rights reserved.