public interface AsyncApi
Note that this API supports all the operations in BlockingApi.
| 限定符和类型 | 方法和说明 |
|---|---|
default CompletableFuture<RaftClientReply> |
send(Message message)
The same as send(message, ReplicationLevel.MAJORITY).
|
CompletableFuture<RaftClientReply> |
send(Message message,
org.apache.ratis.proto.RaftProtos.ReplicationLevel replication)
Send the given message asynchronously to the raft service.
|
CompletableFuture<RaftClientReply> |
sendReadAfterWrite(Message message)
Send the given readonly message asynchronously to the raft service.
|
default CompletableFuture<RaftClientReply> |
sendReadOnly(Message message)
The same as sendReadOnly(message, null).
|
CompletableFuture<RaftClientReply> |
sendReadOnly(Message message,
RaftPeerId server)
Send the given readonly message asynchronously to the raft service.
|
CompletableFuture<RaftClientReply> |
sendReadOnlyNonLinearizable(Message message)
Send the given readonly message asynchronously to the raft service using non-linearizable read.
|
default CompletableFuture<RaftClientReply> |
sendReadOnlyUnordered(Message message)
The same as sendReadOnlyUnordered(message, null).
|
CompletableFuture<RaftClientReply> |
sendReadOnlyUnordered(Message message,
RaftPeerId server)
Send the given readonly message asynchronously to the raft service.
|
CompletableFuture<RaftClientReply> |
sendStaleRead(Message message,
long minIndex,
RaftPeerId server)
Send the given stale-read message asynchronously to the given server (not the raft service).
|
CompletableFuture<RaftClientReply> |
watch(long index,
org.apache.ratis.proto.RaftProtos.ReplicationLevel replication)
Watch the given index asynchronously to satisfy the given replication level.
|
CompletableFuture<RaftClientReply> send(Message message, org.apache.ratis.proto.RaftProtos.ReplicationLevel replication)
sendReadOnly(Message) instead.message - The request message.replication - The replication level to wait for.default CompletableFuture<RaftClientReply> send(Message message)
default CompletableFuture<RaftClientReply> sendReadOnly(Message message)
CompletableFuture<RaftClientReply> sendReadOnly(Message message, RaftPeerId server)
message - The request message.server - The target server. When server == null, send the message to the leader.CompletableFuture<RaftClientReply> sendReadAfterWrite(Message message)
message - The request message.CompletableFuture<RaftClientReply> sendReadOnlyNonLinearizable(Message message)
sendReadOnly(Message).message - The request message.default CompletableFuture<RaftClientReply> sendReadOnlyUnordered(Message message)
CompletableFuture<RaftClientReply> sendReadOnlyUnordered(Message message, RaftPeerId server)
message - The request message.server - The target server. When server == null, send the message to the leader.CompletableFuture<RaftClientReply> sendStaleRead(Message message, long minIndex, RaftPeerId server)
StaleReadException.message - The request message.minIndex - The minimum log index that the server log must have already committed.server - The target serverCompletableFuture<RaftClientReply> watch(long index, org.apache.ratis.proto.RaftProtos.ReplicationLevel replication)
index - The log index to be watched.replication - The replication level required.RaftClientReply.isSuccess() == true,
the reply index (i.e. RaftClientReply.getLogIndex()) is the log index satisfying the request,
where reply index >= watch index.Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.