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

Method keepAlive

ZezeJava/ZezeJava/src/main/java/Zeze/Dbh2/Dbh2Agent.java:115–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 }
114
115 public void keepAlive() {
116 if (loginFuture.isDone() && !loginFuture.isCompletedExceptionally() && !loginFuture.isCancelled())
117 return; // not login
118
119 var rpc = new KeepAlive();
120 raftClient.send(rpc, p -> {
121 if (!rpc.isTimeout() && (rpc.getResultCode() == 0 || rpc.getResultCode() == Procedure.RaftApplied))
122 activeTime = System.currentTimeMillis(); // KeepAlive.Response
123 return 0;
124 });
125 }
126
127 public Dbh2Agent(String raftConfigString) throws Exception {
128 this(raftConfigString, (ProxyAgent)null);

Callers

nothing calls this directly

Calls 6

sendMethod · 0.65
isDoneMethod · 0.45
isCancelledMethod · 0.45
isTimeoutMethod · 0.45
getResultCodeMethod · 0.45

Tested by

no test coverage detected