use of org.neo4j.causalclustering.core.state.machines.tx.CoreReplicatedContent in project neo4j by neo4j.
the class CommandApplicationProcess method handleOperations.
private long handleOperations(long commandIndex, List<DistributedOperation> operations) {
try (CommandDispatcher dispatcher = coreStateMachines.commandDispatcher()) {
for (DistributedOperation operation : operations) {
if (!sessionTracker.validateOperation(operation.globalSession(), operation.operationId())) {
sessionTracker.validateOperation(operation.globalSession(), operation.operationId());
commandIndex++;
continue;
}
CoreReplicatedContent command = (CoreReplicatedContent) operation.content();
command.dispatch(dispatcher, commandIndex, result -> progressTracker.trackResult(operation, result));
sessionTracker.update(operation.globalSession(), operation.operationId(), commandIndex);
commandIndex++;
}
}
return commandIndex - 1;
}
Aggregations