public class ReplicatedTransactionStateMachine extends Object implements StateMachine<ReplicatedTransaction>
| Constructor and Description |
|---|
ReplicatedTransactionStateMachine(ReplicatedLockTokenStateMachine lockStateMachine,
int maxBatchSize,
org.neo4j.logging.LogProvider logProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyCommand(ReplicatedTransaction replicatedTx,
long commandIndex,
Consumer<Result> callback)
Apply command to state machine, modifying its internal state.
|
void |
ensuredApplied() |
void |
flush()
Flushes state to durable storage.
|
void |
installCommitProcess(org.neo4j.kernel.impl.api.TransactionCommitProcess commitProcess,
long lastCommittedIndex) |
long |
lastAppliedIndex()
Return the index of the last applied command by this state machine.
|
public ReplicatedTransactionStateMachine(ReplicatedLockTokenStateMachine lockStateMachine, int maxBatchSize, org.neo4j.logging.LogProvider logProvider)
public void installCommitProcess(org.neo4j.kernel.impl.api.TransactionCommitProcess commitProcess,
long lastCommittedIndex)
public void applyCommand(ReplicatedTransaction replicatedTx, long commandIndex, Consumer<Result> callback)
StateMachineapplyCommand in interface StateMachine<ReplicatedTransaction>replicatedTx - Command to the state machine.commandIndex - The index of the command.callback - To be called when a result is produced.public void flush()
throws IOException
StateMachineflush in interface StateMachine<ReplicatedTransaction>IOExceptionpublic long lastAppliedIndex()
StateMachinelastAppliedIndex in interface StateMachine<ReplicatedTransaction>public void ensuredApplied()
Copyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.