()
| 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); |
nothing calls this directly
no test coverage detected