This is an automated email from the ASF dual-hosted git repository.
mercyblitz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new cd20009 fix-#6778. modify the method description, unhealthy -> enable
(#6779)
cd20009 is described below
commit cd20009336a94963e89d0ec9a713dee68c844699
Author: 赵延 <[email protected]>
AuthorDate: Mon Sep 28 14:09:19 2020 +0800
fix-#6778. modify the method description, unhealthy -> enable (#6779)
---
.../org/apache/dubbo/registry/nacos/NacosRegistry.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git
a/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java
b/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java
index c34eac8..743551f 100644
---
a/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java
+++
b/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java
@@ -513,19 +513,19 @@ public class NacosRegistry extends FailbackRegistry {
}
/**
- * Notify the Healthy {@link Instance instances} to subscriber.
+ * Notify the Enabled {@link Instance instances} to subscriber.
*
* @param url {@link URL}
* @param listener {@link NotifyListener}
* @param instances all {@link Instance instances}
*/
private void notifySubscriber(URL url, NotifyListener listener,
Collection<Instance> instances) {
- List<Instance> healthyInstances = new LinkedList<>(instances);
- if (healthyInstances.size() > 0) {
- // Healthy Instances
- filterHealthyInstances(healthyInstances);
+ List<Instance> enabledInstances = new LinkedList<>(instances);
+ if (enabledInstances.size() > 0) {
+ // Instances
+ filterEnabledInstances(enabledInstances);
}
- List<URL> urls = toUrlWithEmpty(url, healthyInstances);
+ List<URL> urls = toUrlWithEmpty(url, enabledInstances);
NacosRegistry.this.notify(url, listener, urls);
}
@@ -588,7 +588,7 @@ public class NacosRegistry extends FailbackRegistry {
}
}
- private void filterHealthyInstances(Collection<Instance> instances) {
+ private void filterEnabledInstances(Collection<Instance> instances) {
filterData(instances, Instance::isEnabled);
}