(Service service, RaftConfig raftConf)
| 168 | } |
| 169 | |
| 170 | public static void createAcceptor(Service service, RaftConfig raftConf) { |
| 171 | var node = raftConf.getNodes().get(raftConf.getName()); |
| 172 | if (node == null) |
| 173 | throw new IllegalStateException("Raft.Name=" + raftConf.getName() + " Not In Node"); |
| 174 | service.getConfig().addAcceptor(new Acceptor(node.getPort(), node.getHost())); |
| 175 | } |
| 176 | |
| 177 | private boolean isImportantProtocol(long typeId) { |
| 178 | return isHandshakeProtocol(typeId) // 【注意】下面这些模块的Id总是为0。 |