public interface StateMachine
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onApply(CommittedEntryIterator iter)
Update the user statemachine with a batch a tasks that can be accessed
through |iterator|.
|
void |
onShutdown()
Invoked once when the raft node was shut down.
|
boolean |
onSnapshotLoad(SnapshotReader reader)
User defined snapshot load function.
|
void |
onSnapshotSave(SnapshotWriter writer,
java.util.concurrent.CompletableFuture<java.lang.Boolean> done)
User defined snapshot generate function, this method will block StateMachine#onApply(Iterator).
|
void onApply(CommittedEntryIterator iter)
iter - iterator of committed entryvoid onSnapshotSave(SnapshotWriter writer, java.util.concurrent.CompletableFuture<java.lang.Boolean> done)
writer - snapshot writerdone - callbackboolean onSnapshotLoad(SnapshotReader reader)
reader - snapshot readervoid onShutdown()
Copyright © 2022. All Rights Reserved.