You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/04/22 05:01:32 UTC

[GitHub] [rocketmq] dugenkui03 commented on a diff in pull request #4195: Dledger controller

dugenkui03 commented on code in PR #4195:
URL: https://github.com/apache/rocketmq/pull/4195#discussion_r855767880


##########
common/src/main/java/org/apache/rocketmq/common/namesrv/NamesrvConfig.java:
##########
@@ -200,4 +221,68 @@ public boolean isEnableAllTopicList() {
     public void setEnableAllTopicList(boolean enableAllTopicList) {
         this.enableAllTopicList = enableAllTopicList;
     }
+
+    public boolean isStartupController() {
+        return isStartupController;
+    }
+
+    public void setStartupController(boolean startupController) {
+        isStartupController = startupController;
+    }
+
+    public int getControllerThreadPoolNums() {
+        return controllerThreadPoolNums;
+    }
+
+    public void setControllerThreadPoolNums(int controllerThreadPoolNums) {
+        this.controllerThreadPoolNums = controllerThreadPoolNums;
+    }
+
+    public int getControllerRequestThreadPoolQueueCapacity() {
+        return controllerRequestThreadPoolQueueCapacity;
+    }
+
+    public void setControllerRequestThreadPoolQueueCapacity(int controllerRequestThreadPoolQueueCapacity) {
+        this.controllerRequestThreadPoolQueueCapacity = controllerRequestThreadPoolQueueCapacity;
+    }
+
+    public String getControllerDLegerGroup() {
+        return controllerDLegerGroup;
+    }
+
+    public void setControllerDLegerGroup(String controllerDLegerGroup) {
+        this.controllerDLegerGroup = controllerDLegerGroup;
+    }
+
+    public String getControllerDLegerPeers() {
+        return controllerDLegerPeers;
+    }
+
+    public void setControllerDLegerPeers(String controllerDLegerPeers) {
+        this.controllerDLegerPeers = controllerDLegerPeers;
+    }
+
+    public String getControllerDLegerSelfId() {
+        return controllerDLegerSelfId;
+    }
+
+    public void setControllerDLegerSelfId(String controllerDLegerSelfId) {
+        this.controllerDLegerSelfId = controllerDLegerSelfId;
+    }
+
+    public String getControllerStorePath() {
+        return controllerStorePath;
+    }
+
+    public void setControllerStorePath(String controllerStorePath) {
+        this.controllerStorePath = controllerStorePath;
+    }
+
+    public boolean isEnableElectUncleanMaster() {
+        return enableElectUncleanMaster;
+    }
+
+    public void setEnableElectUncleanMaster(boolean enableElectUncleanMaster) {
+        this.enableElectUncleanMaster = enableElectUncleanMaster;
+    }

Review Comment:
   Do we really need `setter` method? that will make code, which can get object reference, could change the state.
   
   #### Describe in Chinese
   该PR中的实体对象有必要定义 setter 方法吗?**setter方法意味着所有获取对象引用的代码都可以修改该对象状态**。而且似乎没有地方用到这些方法。
   
   是否直接在构造函数中为 final 修饰的属性设置值更好、或者使用builder模式。



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org