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

Method createAcceptor

ZezeJava/ZezeJava/src/main/java/Zeze/Raft/Server.java:170–175  ·  view source on GitHub ↗
(Service service, RaftConfig raftConf)

Source from the content-addressed store, hash-verified

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。

Callers 1

RaftMethod · 0.95

Calls 7

addAcceptorMethod · 0.80
getMethod · 0.65
getNameMethod · 0.65
getPortMethod · 0.65
getHostMethod · 0.65
getNodesMethod · 0.45
getConfigMethod · 0.45

Tested by

no test coverage detected