public interface BlockingApi
Note that this API supports a subset of the operations in AsyncApi.
| 限定符和类型 | 方法和说明 |
|---|---|
RaftClientReply |
send(Message message)
Send the given message to the raft service.
|
RaftClientReply |
sendReadAfterWrite(Message message)
Send the given readonly message to the raft service.
|
default RaftClientReply |
sendReadOnly(Message message)
The same as sendReadOnly(message, null).
|
RaftClientReply |
sendReadOnly(Message message,
RaftPeerId server)
Send the given readonly message to the raft service.
|
RaftClientReply |
sendReadOnlyNonLinearizable(Message message)
Send the given readonly message to the raft service using non-linearizable read.
|
RaftClientReply |
sendStaleRead(Message message,
long minIndex,
RaftPeerId server)
Send the given stale-read message to the given server (not the raft service).
|
RaftClientReply |
watch(long index,
org.apache.ratis.proto.RaftProtos.ReplicationLevel replication)
Watch the given index to satisfy the given replication level.
|
RaftClientReply send(Message message) throws IOException
sendReadOnly(Message) instead.message - The request message.IOExceptiondefault RaftClientReply sendReadOnly(Message message) throws IOException
IOExceptionRaftClientReply sendReadOnly(Message message, RaftPeerId server) throws IOException
message - The request message.server - The target server. When server == null, send the message to the leader.IOExceptionRaftClientReply sendReadOnlyNonLinearizable(Message message) throws IOException
sendReadOnly(Message).message - The request message.IOExceptionRaftClientReply sendReadAfterWrite(Message message) throws IOException
message - The request message.IOExceptionRaftClientReply sendStaleRead(Message message, long minIndex, RaftPeerId server) throws IOException
StaleReadException.message - The request message.minIndex - The minimum log index that the server log must have already committed.server - The target serverIOExceptionRaftClientReply watch(long index, org.apache.ratis.proto.RaftProtos.ReplicationLevel replication) throws IOException
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.IOExceptionCopyright © 2017–2025 The Apache Software Foundation. All rights reserved.