You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/01/15 09:41:16 UTC

[dubbo] 03/03: fix merg conflicts

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

liujun pushed a commit to branch 3.0-k8s
in repository https://gitbox.apache.org/repos/asf/dubbo.git

commit c22b1e28888e4146d863ca6a8e8281983deaaf22
Author: ken.lj <ke...@gmail.com>
AuthorDate: Fri Jan 15 17:40:25 2021 +0800

    fix merg conflicts
---
 .../registry/client/metadata/MetadataUtils.java    |  5 ---
 .../client/migration/MigrationClusterInvoker.java  | 50 ++++++++++++++++++++++
 2 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataUtils.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataUtils.java
index dff55f3..27f66f5 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataUtils.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/MetadataUtils.java
@@ -149,9 +149,4 @@ public class MetadataUtils {
         // store in local
         getLocalMetadataService().setMetadataServiceURL(url);
     }
-
-    public static void saveMetadataURL(URL url) {
-        // store in local
-        getLocalMetadataService().setMetadataServiceURL(url);
-    }
 }
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationClusterInvoker.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationClusterInvoker.java
new file mode 100644
index 0000000..2efae4c
--- /dev/null
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationClusterInvoker.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.registry.client.migration;
+
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.registry.client.migration.model.MigrationRule;
+import org.apache.dubbo.registry.client.migration.model.MigrationStep;
+import org.apache.dubbo.rpc.cluster.ClusterInvoker;
+
+/**
+ * FIXME, some methods need to be further optimized.
+ *
+ * @param <T>
+ */
+public interface MigrationClusterInvoker<T> extends ClusterInvoker<T> {
+
+    boolean isServiceDiscovery();
+
+    MigrationStep getMigrationStep();
+
+    void setMigrationStep(MigrationStep step);
+
+    MigrationRule getMigrationRule();
+
+    void setMigrationRule(MigrationRule rule);
+
+    boolean invokersChanged();
+
+    void fallbackToInterfaceInvoker();
+
+    void migrateToServiceDiscoveryInvoker(boolean forceMigrate);
+
+    void refreshServiceDiscoveryInvokerOnMappingCallback(boolean forceMigrate);
+
+    void reRefer(URL newSubscribeUrl);
+}
\ No newline at end of file