qinliujie commented on a change in pull request #9424:
URL: https://github.com/apache/dubbo/pull/9424#discussion_r771072816



##########
File path: 
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/state/AbstractStateRouter.java
##########
@@ -59,21 +74,69 @@ public void setForce(boolean force) {
         this.force = force;
     }
 
-    @Override
-    public int getPriority() {
-        return priority;
+    public GovernanceRuleRepository getRuleRepository() {
+        return this.ruleRepository;
     }
 
-    public void setPriority(int priority) {
-        this.priority = priority;
+    public StateRouter<T> getNextRouter() {
+        return nextRouter;
     }
 
-    public GovernanceRuleRepository getRuleRepository() {
-        return this.ruleRepository;
+    @Override
+    public void notify(BitList<Invoker<T>> invokers) {
+
     }
 
     @Override
-    public void notify(BitList<Invoker<T>> invokers) {
+    public final BitList<Invoker<T>> route(BitList<Invoker<T>> invokers, URL 
url, Invocation invocation, boolean needToPrintMessage, 
Holder<RouterSnapshotNode<T>> nodeHolder) throws RpcException {
+        if (needToPrintMessage && (nodeHolder == null || nodeHolder.get() == 
null)) {
+            needToPrintMessage = false;
+        }
+
+        RouterSnapshotNode<T> currentNode = null;
+        RouterSnapshotNode<T> parentNode = null;
+        Holder<String> messageHolder = null;
+
+        // pre-build current node
+        if (needToPrintMessage) {
+            parentNode = nodeHolder.get();
+            currentNode = new RouterSnapshotNode<>(this.getClass().getName(), 
invokers.clone());
+            parentNode.appendNode(currentNode);
+            messageHolder = new Holder<>();
+            nodeHolder.set(currentNode);
+        }
+        BitList<Invoker<T>> routeResult;
+
+        // check if router support call continue route by itself
+        if (!supportContinueRoute()) {
+            routeResult = doRoute(invokers, url, invocation, 
needToPrintMessage, nodeHolder, messageHolder);

Review comment:
       !supportContinueRoute() ----> supportContinueRoute()
   -----------------------
   maybe it should like that ?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to