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

Method registerInternalRpc

ZezeJava/ZezeJava/src/main/java/Zeze/Raft/Raft.java:855–870  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

853 }
854
855 private void registerInternalRpc() {
856 server.AddFactoryHandle(RequestVote.TypeId_, new Service.ProtocolFactoryHandle<>(
857 RequestVote::new, this::processRequestVote, TransactionLevel.Serializable, DispatchMode.Normal));
858 server.AddFactoryHandle(AppendEntries.TypeId_, new Service.ProtocolFactoryHandle<>(
859 AppendEntries::new, this::processAppendEntries, TransactionLevel.Serializable, DispatchMode.Normal));
860 server.AddFactoryHandle(InstallSnapshot.TypeId_, new Service.ProtocolFactoryHandle<>(
861 InstallSnapshot::new, this::processInstallSnapshot, TransactionLevel.Serializable, DispatchMode.Normal));
862 server.AddFactoryHandle(LeaderIs.TypeId_, new Service.ProtocolFactoryHandle<>(
863 LeaderIs::new, Raft::processLeaderIs, TransactionLevel.Serializable, DispatchMode.Normal));
864 server.AddFactoryHandle(GetLeader.TypeId_, new Service.ProtocolFactoryHandle<>(
865 GetLeader::new, this::processGetLeader, TransactionLevel.None, DispatchMode.Normal));
866 server.AddFactoryHandle(StartServerConnector.TypeId_, new Service.ProtocolFactoryHandle<>(
867 StartServerConnector::new, this::processStartServer, TransactionLevel.None, DispatchMode.Normal));
868 server.AddFactoryHandle(StopServerConnector.TypeId_, new Service.ProtocolFactoryHandle<>(
869 StopServerConnector::new, this::processStopServer, TransactionLevel.None, DispatchMode.Normal));
870 }
871
872 private long processGetLeader(GetLeader r) {
873 // see Server::trySendLeaderIs

Callers 1

RaftMethod · 0.95

Calls 1

AddFactoryHandleMethod · 0.80

Tested by

no test coverage detected