javeme commented on code in PR #2151:
URL:
https://github.com/apache/incubator-hugegraph/pull/2151#discussion_r1134185813
##########
hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/GlobalMasterInfo.java:
##########
@@ -19,26 +19,22 @@
public class GlobalMasterInfo {
- private boolean isMaster;
- private String url;
-
+ private NodeInfo nodeInfo;
private volatile boolean featureSupport;
public GlobalMasterInfo() {
this.featureSupport = false;
+ this.nodeInfo = new NodeInfo(false, "");
}
- public synchronized void set(boolean isMaster, String url) {
- this.isMaster = isMaster;
- this.url = url;
- }
-
- public synchronized boolean isMaster() {
- return this.isMaster;
+ public final void nodeInfo(boolean isMaster, String url) {
Review Comment:
looks useful, the subclasses cannot override 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]