Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nkorange committed Aug 30, 2018
1 parent 79d91fa commit 84df9af
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class BeatReactor {
thread.setName("com.alibaba.nacos.naming.beat.sender");
return thread;
});
;

private long clientBeatInterval = 10 * 1000;

Expand Down
26 changes: 13 additions & 13 deletions common/src/main/java/com/alibaba/nacos/common/util/Pair.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@
* @author nacos
*/
public class Pair {
private String value0;
private String value1;
private String key;
private String value;

public Pair(String value0, String value1) {
this.value0 = value0;
this.value1 = value1;
public Pair(String key, String value) {
this.key = key;
this.value = value;
}

public Pair() {
this(StringUtils.EMPTY, StringUtils.EMPTY);
}

public String getValue0() {
return value0;
public String getKey() {
return key;
}

public void setValue0(String value0) {
this.value0 = value0;
public void setKey(String key) {
this.key = key;
}

public String getValue1() {
return value1;
public String getValue() {
return value;
}

public void setValue1(String value1) {
this.value1 = value1;
public void setValue(String value) {
this.value = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ public void updatedDom2(String domName, String serverIP) {
if (pair == null) {
continue;
}
Boolean valid = Boolean.parseBoolean(pair.getValue0());
Boolean valid = Boolean.parseBoolean(pair.getKey());
if (valid != ipAddress.isValid()) {
ipAddress.setValid(Boolean.parseBoolean(pair.getValue0()));
ipAddress.setInvalidType(pair.getValue1());
ipAddress.setValid(Boolean.parseBoolean(pair.getKey()));
ipAddress.setInvalidType(pair.getValue());
Loggers.EVT_LOG.info("{" + domName + "} {SYNC} " +
"{IP-" + (ipAddress.isValid() ? "ENABLED" : "DISABLED") + "} " + ipAddress.getIp()
+ ":" + ipAddress.getPort() + "@" + ipAddress.getClusterName());
Expand Down

0 comments on commit 84df9af

Please sign in to comment.