public Map<Long,QuorumPeer.QuorumServer> getView() {
return Collections.unmodifiableMap(this.quorumPeers);
}
getView里面实际上返回的是一个quorumPeers,就是参与本次投票的成员有哪些。这个属性在哪里赋值的呢?
我们又得回到runFromConfig方法中
public Map<Long,QuorumPeer.QuorumServer> getView() {
return Collections.unmodifiableMap(this.quorumPeers);
}
getView里面实际上返回的是一个quorumPeers,就是参与本次投票的成员有哪些。这个属性在哪里赋值的呢?
我们又得回到runFromConfig方法中