public interface StateMachine<Command>
| Modifier and Type | Method and Description |
|---|---|
void |
applyCommand(Command command,
long commandIndex,
Consumer<Result> callback)
Apply command to state machine, modifying its internal state.
|
void |
flush()
Flushes state to durable storage.
|
long |
lastAppliedIndex()
Return the index of the last applied command by this state machine.
|
void applyCommand(Command command, long commandIndex, Consumer<Result> callback)
command - Command to the state machine.commandIndex - The index of the command.callback - To be called when a result is produced.void flush()
throws IOException
IOExceptionlong lastAppliedIndex()
Copyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.