MCPcopy Create free account
hub / github.com/e2wugui/zeze / convertStateTo

Method convertStateTo

ZezeJava/ZezeJava/src/main/java/Zeze/Raft/Raft.java:840–853  ·  view source on GitHub ↗
(RaftState newState)

Source from the content-addressed store, hash-verified

838 }
839
840 public void convertStateTo(RaftState newState) throws Exception {
841 resetTimerTime();
842 // 按真值表处理所有情况。
843 switch (getState()) {
844 case Follower:
845 convertStateFromFollowerTo(newState);
846 return;
847 case Candidate:
848 convertStateFromCandidateTo(newState);
849 return;
850 case Leader:
851 convertStateFromLeaderTo(newState);
852 }
853 }
854
855 private void registerInternalRpc() {
856 server.AddFactoryHandle(RequestVote.TypeId_, new Service.ProtocolFactoryHandle<>(

Callers 9

shutdownMethod · 0.95
onTimerMethod · 0.95
processRequestVoteMethod · 0.95
processResultMethod · 0.80
sendHeartbeatToMethod · 0.80

Calls 5

resetTimerTimeMethod · 0.95
getStateMethod · 0.95

Tested by

no test coverage detected