You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/11/30 06:53:46 UTC

[GitHub] [incubator-shardingsphere] dongzl commented on a change in pull request #3620: Apollo as a ConfigCenter.

dongzl commented on a change in pull request #3620: Apollo as a ConfigCenter.
URL: https://github.com/apache/incubator-shardingsphere/pull/3620#discussion_r352270210
 
 

 ##########
 File path: sharding-orchestration/sharding-orchestration-center/src/main/java/org/apache/shardingsphere/orchestration/center/instance/node/ConfigTreeNode.java
 ##########
 @@ -0,0 +1,130 @@
+/*
+ * 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.shardingsphere.orchestration.center.instance.node;
+
+import com.google.common.base.Joiner;
+import com.google.common.collect.Sets;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Config Tree Node.
+ *
+ * @author dongzonglei
+ * @author wangguangyuan
+ * @author sunbufu
+ */
+@Getter
+@Setter
+@AllArgsConstructor
+public final class ConfigTreeNode {
+    
+    private static final String SHARDING_SPHERE_KEY_ROOT = "/";
+    
+    private static final String SHARDING_SPHERE_KEY_SEPARATOR = "/";
+    
+    private static Map<String, Set<String>> childrenKeyMap = new ConcurrentHashMap<>();
+    
+    private ConfigTreeNode parentNode;
+    
+    private String absolutePath;
+    
+    private Set<ConfigTreeNode> childrenNodes;
+    
+    /**
+     * init tree.
+     * 
+     * @param instanceKeys instance Key set
+     * @param keySeparator key separator
+     */
+    public void initTree(final Set<String> instanceKeys, final String keySeparator) {
 
 Review comment:
   OK, I fix it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services