类 CatalogServiceV2Impl
- java.lang.Object
-
- com.alibaba.nacos.naming.core.CatalogServiceV2Impl
-
- 所有已实现的接口:
CatalogService
@Component public class CatalogServiceV2Impl extends java.lang.Object implements CatalogService
Catalog service for v2.x .- 作者:
- xiweng.yy
-
-
字段概要
字段 修饰符和类型 字段 说明 private static intDEFAULT_PORTprivate NamingMetadataManagermetadataManagerprivate ServiceStorageserviceStorage
-
构造器概要
构造器 构造器 说明 CatalogServiceV2Impl(ServiceStorage serviceStorage, NamingMetadataManager metadataManager)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 private intcountHealthyInstance(com.alibaba.nacos.api.naming.pojo.ServiceInfo data)private java.util.Collection<Service>doPage(java.util.Collection<Service> services, int pageNo, int pageSize)private java.util.Map<java.lang.String,ClusterInfo>getClusterMap(Service service)private java.lang.StringgetRegexString(java.lang.String target)java.lang.ObjectgetServiceDetail(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName)Get service detail information.private booleanisProtectThreshold(ServiceView serviceView, ServiceMetadata metadata)java.util.List<? extends com.alibaba.nacos.api.naming.pojo.Instance>listAllInstances(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName)List all instances of specified services.java.util.List<? extends com.alibaba.nacos.api.naming.pojo.Instance>listInstances(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName, java.lang.String clusterName)List all instances of specified services.java.lang.ObjectpageListService(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName, int pageNo, int pageSize, java.lang.String instancePattern, boolean ignoreEmptyService)List service by page.java.lang.ObjectpageListServiceDetail(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName, int pageNo, int pageSize)List service with cluster and instances by page.private java.util.Collection<Service>patternServices(java.lang.String namespaceId, java.lang.String group, java.lang.String serviceName)private IpAddressInfotransferToIpAddressInfo(com.alibaba.nacos.api.naming.pojo.Instance instance)
-
-
-
字段详细资料
-
serviceStorage
private final ServiceStorage serviceStorage
-
metadataManager
private final NamingMetadataManager metadataManager
-
DEFAULT_PORT
private static final int DEFAULT_PORT
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
CatalogServiceV2Impl
public CatalogServiceV2Impl(ServiceStorage serviceStorage, NamingMetadataManager metadataManager)
-
-
方法详细资料
-
getServiceDetail
public java.lang.Object getServiceDetail(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName) throws com.alibaba.nacos.api.exception.NacosException从接口复制的说明:CatalogServiceGet service detail information.- 指定者:
getServiceDetail在接口中CatalogService- 参数:
namespaceId- namespace id of servicegroupName- group name of serviceserviceName- service name- 返回:
- detail information of service
- 抛出:
com.alibaba.nacos.api.exception.NacosException- exception in query
-
listInstances
public java.util.List<? extends com.alibaba.nacos.api.naming.pojo.Instance> listInstances(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName, java.lang.String clusterName) throws com.alibaba.nacos.api.exception.NacosException从接口复制的说明:CatalogServiceList all instances of specified services.- 指定者:
listInstances在接口中CatalogService- 参数:
namespaceId- namespace id of servicegroupName- group name of serviceserviceName- service nameclusterName- cluster name of instances- 返回:
- instances list
- 抛出:
com.alibaba.nacos.api.exception.NacosException- exception in query
-
listAllInstances
public java.util.List<? extends com.alibaba.nacos.api.naming.pojo.Instance> listAllInstances(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName)从接口复制的说明:CatalogServiceList all instances of specified services.- 指定者:
listAllInstances在接口中CatalogService- 参数:
namespaceId- namespace id of servicegroupName- group name of serviceserviceName- service name- 返回:
- instances list
-
pageListService
public java.lang.Object pageListService(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName, int pageNo, int pageSize, java.lang.String instancePattern, boolean ignoreEmptyService) throws com.alibaba.nacos.api.exception.NacosException从接口复制的说明:CatalogServiceList service by page.- 指定者:
pageListService在接口中CatalogService- 参数:
namespaceId- namespace id of servicegroupName- group name of serviceserviceName- service namepageNo- page numberpageSize- page sizeinstancePattern- contained instances patternignoreEmptyService- whether ignore empty service- 返回:
- service list
- 抛出:
com.alibaba.nacos.api.exception.NacosException- exception in query
-
countHealthyInstance
private int countHealthyInstance(com.alibaba.nacos.api.naming.pojo.ServiceInfo data)
-
isProtectThreshold
private boolean isProtectThreshold(ServiceView serviceView, ServiceMetadata metadata)
-
pageListServiceDetail
public java.lang.Object pageListServiceDetail(java.lang.String namespaceId, java.lang.String groupName, java.lang.String serviceName, int pageNo, int pageSize) throws com.alibaba.nacos.api.exception.NacosException从接口复制的说明:CatalogServiceList service with cluster and instances by page.- 指定者:
pageListServiceDetail在接口中CatalogService- 参数:
namespaceId- namespace id of servicegroupName- group name of serviceserviceName- service namepageNo- page numberpageSize- page size- 返回:
- service list
- 抛出:
com.alibaba.nacos.api.exception.NacosException- exception in query
-
getClusterMap
private java.util.Map<java.lang.String,ClusterInfo> getClusterMap(Service service)
-
transferToIpAddressInfo
private IpAddressInfo transferToIpAddressInfo(com.alibaba.nacos.api.naming.pojo.Instance instance)
-
patternServices
private java.util.Collection<Service> patternServices(java.lang.String namespaceId, java.lang.String group, java.lang.String serviceName)
-
getRegexString
private java.lang.String getRegexString(java.lang.String target)
-
-