public static interface StateMachine.DataApi
| 限定符和类型 | 字段和说明 |
|---|---|
static StateMachine.DataApi |
DEFAULT
A noop implementation of
StateMachine.DataApi. |
| 限定符和类型 | 方法和说明 |
|---|---|
default CompletableFuture<Void> |
flush(long logIndex)
Flush the state machine data till the given log index.
|
default CompletableFuture<?> |
link(StateMachine.DataStream stream,
org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
Link asynchronously the given stream with the given log entry.
|
default CompletableFuture<org.apache.ratis.thirdparty.com.google.protobuf.ByteString> |
read(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
Read asynchronously the state machine data from this state machine.
|
default CompletableFuture<org.apache.ratis.thirdparty.com.google.protobuf.ByteString> |
read(org.apache.ratis.proto.RaftProtos.LogEntryProto entry,
TransactionContext context)
Read asynchronously the state machine data from this state machine.
|
default CompletableFuture<StateMachine.DataStream> |
stream(RaftClientRequest request)
Create asynchronously a
StateMachine.DataStream to stream state machine data. |
default CompletableFuture<Void> |
truncate(long logIndex)
Truncates asynchronously the state machine data to the given log index.
|
default CompletableFuture<?> |
write(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
Write asynchronously the state machine data in the given log entry to this state machine.
|
default CompletableFuture<?> |
write(org.apache.ratis.proto.RaftProtos.LogEntryProto entry,
TransactionContext context)
Write asynchronously the state machine data in the given log entry to this state machine.
|
static final StateMachine.DataApi DEFAULT
StateMachine.DataApi.default CompletableFuture<org.apache.ratis.thirdparty.com.google.protobuf.ByteString> read(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
default CompletableFuture<org.apache.ratis.thirdparty.com.google.protobuf.ByteString> read(org.apache.ratis.proto.RaftProtos.LogEntryProto entry, TransactionContext context)
default CompletableFuture<?> write(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
default CompletableFuture<?> write(org.apache.ratis.proto.RaftProtos.LogEntryProto entry, TransactionContext context)
default CompletableFuture<StateMachine.DataStream> stream(RaftClientRequest request)
StateMachine.DataStream to stream state machine data.
The state machine may use the first message (i.e. request.getMessage()) as the header to create the stream.default CompletableFuture<?> link(StateMachine.DataStream stream, org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
stream - the stream, which can possibly be null, to be linked.entry - the log entry to be linked.default CompletableFuture<Void> flush(long logIndex)
logIndex - The log index to flush.default CompletableFuture<Void> truncate(long logIndex)
logIndex - The last log index after truncation.Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.