public class ServiceInstancesByProto extends Object implements ServiceInstances, RegistryCacheValue
| 限定符和类型 | 字段和说明 |
|---|---|
static ServiceInstancesByProto |
EMPTY_INSTANCES |
| 构造器和说明 |
|---|
ServiceInstancesByProto()
创建空的服务对象
|
ServiceInstancesByProto(ResponseProto.DiscoverResponse response,
ServiceInstancesByProto oldSvcInstances,
boolean loadFromFile)
构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
ServiceEventKey.EventType |
getEventType()
缓存对象类型
|
InstanceByProto |
getInstance(String instId)
获取实例本地数据
|
InstanceByProto |
getInstanceByNode(Node node) |
List<Instance> |
getInstances()
获取服务实例列表
|
Map<String,String> |
getMetadata()
获取服务元数据信息
|
String |
getNamespace()
获取名字空间
|
List<ServiceProto.Instance> |
getOriginInstancesList() |
String |
getRevision()
获取唯一标识信息
|
String |
getService()
获取服务名
|
ServiceKey |
getServiceKey()
获取服务标识
|
int |
getTotalWeight()
获取服务实例总权重值
|
int |
hashCode() |
boolean |
isInitialized()
服务实例列表是否已经加载
|
boolean |
isLoadedFromFile()
判断是否从文件中加载
|
String |
toString() |
public static final ServiceInstancesByProto EMPTY_INSTANCES
public ServiceInstancesByProto(ResponseProto.DiscoverResponse response, ServiceInstancesByProto oldSvcInstances, boolean loadFromFile)
response - 应答ProtooldSvcInstances - 旧的实例列表loadFromFile - 是否从缓存文件加载public ServiceInstancesByProto()
public ServiceKey getServiceKey()
ServiceInstancesgetServiceKey 在接口中 ServiceInstancespublic int getTotalWeight()
ServiceInstancesgetTotalWeight 在接口中 ServiceInstancespublic List<Instance> getInstances()
ServiceInstancesgetInstances 在接口中 ServiceInstancespublic boolean isLoadedFromFile()
RegistryCacheValueisLoadedFromFile 在接口中 RegistryCacheValuepublic ServiceEventKey.EventType getEventType()
RegistryCacheValuegetEventType 在接口中 RegistryCacheValuepublic boolean isInitialized()
ServiceInstancesisInitialized 在接口中 RegistryCacheValueisInitialized 在接口中 ServiceInstancespublic String getRevision()
ServiceInstancesgetRevision 在接口中 RegistryCacheValuegetRevision 在接口中 ServiceInstancespublic String getService()
ServicegetService 在接口中 Servicepublic String getNamespace()
ServicegetNamespace 在接口中 Servicepublic Map<String,String> getMetadata()
ServiceMetadatagetMetadata 在接口中 ServiceMetadatapublic InstanceByProto getInstance(String instId)
instId - 实例IDpublic InstanceByProto getInstanceByNode(Node node)
public List<ServiceProto.Instance> getOriginInstancesList()
Copyright © 2022. All rights reserved.