public class ReplicatedTokenStateMachine<TOKEN extends org.neo4j.storageengine.api.Token> extends Object implements StateMachine<ReplicatedTokenRequest>
| Constructor and Description |
|---|
ReplicatedTokenStateMachine(TokenRegistry<TOKEN> tokenRegistry,
org.neo4j.storageengine.api.TokenFactory<TOKEN> tokenFactory,
org.neo4j.logging.LogProvider logProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyCommand(ReplicatedTokenRequest tokenRequest,
long commandIndex,
Consumer<Result> callback)
Apply command to state machine, modifying its internal state.
|
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 ReplicatedTokenStateMachine(TokenRegistry<TOKEN> tokenRegistry, org.neo4j.storageengine.api.TokenFactory<TOKEN> tokenFactory, org.neo4j.logging.LogProvider logProvider)
public void installCommitProcess(org.neo4j.kernel.impl.api.TransactionCommitProcess commitProcess,
long lastCommittedIndex)
public void applyCommand(ReplicatedTokenRequest tokenRequest, long commandIndex, Consumer<Result> callback)
StateMachineapplyCommand in interface StateMachine<ReplicatedTokenRequest>tokenRequest - 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<ReplicatedTokenRequest>IOExceptionpublic long lastAppliedIndex()
StateMachinelastAppliedIndex in interface StateMachine<ReplicatedTokenRequest>Copyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.