[ISSUE #6421] Fix the encode bug.

This commit is contained in:
Ji Juntao
2023-03-21 13:38:00 +08:00
committed by GitHub
parent f2614f62c8
commit cafc9ac3de
@@ -39,7 +39,7 @@ public class BrokerReplicasInfo extends RemotingSerializable {
}
public void setReplicasInfoTable(
Map<String, ReplicasInfo> replicasInfoTable) {
Map<String, ReplicasInfo> replicasInfoTable) {
this.replicasInfoTable = replicasInfoTable;
}
@@ -92,7 +92,7 @@ public class BrokerReplicasInfo extends RemotingSerializable {
}
public void setInSyncReplicas(
List<ReplicaIdentity> inSyncReplicas) {
List<ReplicaIdentity> inSyncReplicas) {
this.inSyncReplicas = inSyncReplicas;
}
@@ -101,7 +101,7 @@ public class BrokerReplicasInfo extends RemotingSerializable {
}
public void setNotInSyncReplicas(
List<ReplicaIdentity> notInSyncReplicas) {
List<ReplicaIdentity> notInSyncReplicas) {
this.notInSyncReplicas = notInSyncReplicas;
}
@@ -131,12 +131,20 @@ public class BrokerReplicasInfo extends RemotingSerializable {
private Long brokerId;
private String brokerAddress;
private Boolean isAlive = false;
private Boolean alive;
public ReplicaIdentity(String brokerName, Long brokerId, String brokerAddress) {
this.brokerName = brokerName;
this.brokerId = brokerId;
this.brokerAddress = brokerAddress;
this.alive = false;
}
public ReplicaIdentity(String brokerName, Long brokerId, String brokerAddress, Boolean alive) {
this.brokerName = brokerName;
this.brokerId = brokerId;
this.brokerAddress = brokerAddress;
this.alive = alive;
}
public String getBrokerName() {
@@ -164,11 +172,11 @@ public class BrokerReplicasInfo extends RemotingSerializable {
}
public Boolean getAlive() {
return isAlive;
return alive;
}
public void setAlive(Boolean alive) {
isAlive = alive;
this.alive = alive;
}
@Override
@@ -177,7 +185,7 @@ public class BrokerReplicasInfo extends RemotingSerializable {
"brokerName='" + brokerName + '\'' +
", brokerId=" + brokerId +
", brokerAddress='" + brokerAddress + '\'' +
", isAlive=" + isAlive +
", alive=" + alive +
'}';
}