| 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 |