use of org.apache.ratis.client.impl.RaftClientImpl.PendingClientRequest in project incubator-ratis by apache.
the class UnorderedAsync method send.
static CompletableFuture<RaftClientReply> send(RaftClientRequest.Type type, RaftClientImpl client) {
final long callId = CallId.getAndIncrement();
final PendingClientRequest pending = new PendingUnorderedRequest(() -> client.newRaftClientRequest(null, callId, null, type, null));
sendRequestWithRetry(pending, client);
return pending.getReplyFuture().thenApply(reply -> RaftClientImpl.handleRaftException(reply, CompletionException::new));
}
Aggregations