You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/03/11 11:21:05 UTC

[dubbo] branch master updated: Super interface shouldn't import sub interface. (#7279)

This is an automated email from the ASF dual-hosted git repository.

albumenj 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 60a2244  Super interface shouldn't import sub interface. (#7279)
60a2244 is described below

commit 60a2244de6a7b7b5a1c4062b5a23a84e8540ce83
Author: 赵延 <10...@qq.com>
AuthorDate: Thu Mar 11 19:20:48 2021 +0800

    Super interface shouldn't import sub interface. (#7279)
    
    * super interface shouldn't import sub interface.
    
    * some doc and log info fix.
---
 .../src/main/java/org/apache/dubbo/rpc/cluster/Cluster.java  |  6 +++---
 .../org/apache/dubbo/registry/client/ServiceDiscovery.java   | 12 ++++++------
 .../registry/client/event/listener/LoggingEventListener.java |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Cluster.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Cluster.java
index 948827a..1fdadf8 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Cluster.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/Cluster.java
@@ -22,7 +22,6 @@ import org.apache.dubbo.common.extension.SPI;
 import org.apache.dubbo.common.utils.StringUtils;
 import org.apache.dubbo.rpc.Invoker;
 import org.apache.dubbo.rpc.RpcException;
-import org.apache.dubbo.rpc.cluster.support.FailoverCluster;
 
 /**
  * Cluster. (SPI, Singleton, ThreadSafe)
@@ -33,7 +32,8 @@ import org.apache.dubbo.rpc.cluster.support.FailoverCluster;
  */
 @SPI(Cluster.DEFAULT)
 public interface Cluster {
-    String DEFAULT = FailoverCluster.NAME;
+
+    String DEFAULT = "failover";
 
     /**
      * Merge the directory invokers to a virtual invoker.
@@ -56,4 +56,4 @@ public interface Cluster {
         }
         return ExtensionLoader.getExtensionLoader(Cluster.class).getExtension(name, wrap);
     }
-}
\ No newline at end of file
+}
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscovery.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscovery.java
index 3b6c4e5..9d08e40 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscovery.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscovery.java
@@ -86,7 +86,7 @@ public interface ServiceDiscovery extends Prioritized {
     /**
      * Unregisters an instance of {@link ServiceInstance}.
      *
-     * @param serviceInstance an instance of {@link ServiceInstance} to be deregistered
+     * @param serviceInstance an instance of {@link ServiceInstance} to be unregistered
      * @throws RuntimeException if failed
      */
     void unregister(ServiceInstance serviceInstance) throws RuntimeException;
@@ -116,7 +116,7 @@ public interface ServiceDiscovery extends Prioritized {
      *
      * @param serviceName the service name
      * @return non-null {@link List}
-     * @throws NullPointerException if <code>serviceName</code> is <code>null</code> is <code>null</code>
+     * @throws NullPointerException if <code>serviceName</code> is <code>null</code>
      */
     default List<ServiceInstance> getInstances(String serviceName) throws NullPointerException {
 
@@ -147,7 +147,7 @@ public interface ServiceDiscovery extends Prioritized {
      * @param offset      the offset of request , the number "0" indicates first page
      * @param pageSize    the number of request, the {@link Integer#MAX_VALUE max value} indicates the range is unlimited
      * @return non-null {@link Page} object
-     * @throws NullPointerException          if <code>serviceName</code> is <code>null</code> is <code>null</code>
+     * @throws NullPointerException          if <code>serviceName</code> is <code>null</code>
      * @throws IllegalArgumentException      if <code>offset</code> or <code>pageSize</code> is negative number
      * @throws UnsupportedOperationException if not supported
      */
@@ -165,7 +165,7 @@ public interface ServiceDiscovery extends Prioritized {
      * @param pageSize    the number of request, the {@link Integer#MAX_VALUE max value} indicates the range is unlimited
      * @param healthyOnly if <code>true</code> , filter healthy instances only
      * @return non-null {@link Page} object
-     * @throws NullPointerException          if <code>serviceName</code> is <code>null</code> is <code>null</code>
+     * @throws NullPointerException          if <code>serviceName</code> is <code>null</code>
      * @throws IllegalArgumentException      if <code>offset</code> or <code>pageSize</code> is negative number
      * @throws UnsupportedOperationException if not supported
      */
@@ -182,7 +182,7 @@ public interface ServiceDiscovery extends Prioritized {
      * @param requestSize  the number of request, the {@link Integer#MAX_VALUE max value} indicates the range is unlimited
      * @return non-null read-only {@link Map} whose key is the service name and value is
      * the {@link Page pagination} of {@link ServiceInstance service instances}
-     * @throws NullPointerException          if <code>serviceName</code> is <code>null</code> is <code>null</code>
+     * @throws NullPointerException          if <code>serviceName</code> is <code>null</code>
      * @throws IllegalArgumentException      if <code>offset</code> or <code>requestSize</code> is negative number
      * @throws UnsupportedOperationException if not supported
      */
@@ -198,7 +198,7 @@ public interface ServiceDiscovery extends Prioritized {
     /**
      * Add an instance of {@link ServiceInstancesChangedListener} for specified service
      * <p>
-     * Default, Current method will be invoked by {@link ServiceDiscoveryRegistry#subscribe(URL, NotifyListener)
+     * Default, current method will be invoked by {@link ServiceDiscoveryRegistry#subscribe(URL, NotifyListener)
      * the ServiceDiscoveryRegistry on the subscription}, and it's mandatory to
      * {@link EventDispatcher#addEventListener(EventListener) add} the {@link ServiceInstancesChangedListener} argument
      * into {@link EventDispatcher} whether the subclass implements same approach or not, thus this method is used to
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/LoggingEventListener.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/LoggingEventListener.java
index 91fb07d..8aad92a 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/LoggingEventListener.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/LoggingEventListener.java
@@ -58,11 +58,11 @@ public class LoggingEventListener extends GenericEventListener {
     }
 
     public void onEvent(ServiceInstancesChangedEvent event) {
-        info("The services'[name : %s] instances[size : %s] has been changed.", event.getServiceName(), event.getServiceInstances().size());
+        info("The service[name : %s] instances[size : %s] has been changed.", event.getServiceName(), event.getServiceInstances().size());
     }
 
     public void onEvent(ServiceInstancePreUnregisteredEvent event) {
-        info("%s is registering from %s...", event.getServiceInstance(), event.getSource());
+        info("%s is unregistering from %s...", event.getServiceInstance(), event.getSource());
     }
 
     public void onEvent(ServiceInstanceUnregisteredEvent event) {