Search in sources :

Example 1 with PendingClientRequest

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));
}
Also used : PendingClientRequest(org.apache.ratis.client.impl.RaftClientImpl.PendingClientRequest)

Aggregations

PendingClientRequest (org.apache.ratis.client.impl.RaftClientImpl.PendingClientRequest)1