use of org.neo4j.kernel.impl.api.GuardingStatementOperations in project neo4j by neo4j.
the class NeoStoreDataSource method buildStatementOperations.
private StatementOperationContainer buildStatementOperations(StoreReadLayer storeReadLayer, AutoIndexing autoIndexing, ConstraintIndexCreator constraintIndexCreator, UpdateableSchemaState updateableSchemaState, Guard guard, LegacyIndexStore legacyIndexStore) {
// The passed in StoreReadLayer is the bottom most layer: Read-access to committed data.
// To it we add:
// + Transaction state handling
StateHandlingStatementOperations stateHandlingContext = new StateHandlingStatementOperations(storeReadLayer, autoIndexing, constraintIndexCreator, legacyIndexStore);
QueryRegistrationOperations queryRegistrationOperations = new StackingQueryRegistrationOperations(clock);
StatementOperationParts parts = new StatementOperationParts(stateHandlingContext, stateHandlingContext, stateHandlingContext, stateHandlingContext, stateHandlingContext, stateHandlingContext, new SchemaStateConcern(updateableSchemaState), null, stateHandlingContext, stateHandlingContext, stateHandlingContext, queryRegistrationOperations);
// + Constraints
ConstraintEnforcingEntityOperations constraintEnforcingEntityOperations = new ConstraintEnforcingEntityOperations(constraintSemantics, parts.entityWriteOperations(), parts.entityReadOperations(), parts.schemaWriteOperations(), parts.schemaReadOperations());
// + Data integrity
DataIntegrityValidatingStatementOperations dataIntegrityContext = new DataIntegrityValidatingStatementOperations(parts.keyWriteOperations(), parts.schemaReadOperations(), constraintEnforcingEntityOperations);
parts = parts.override(null, dataIntegrityContext, constraintEnforcingEntityOperations, constraintEnforcingEntityOperations, null, dataIntegrityContext, null, null, null, null, null, null);
// + Locking
LockingStatementOperations lockingContext = new LockingStatementOperations(parts.entityReadOperations(), parts.entityWriteOperations(), parts.schemaReadOperations(), parts.schemaWriteOperations(), parts.schemaStateOperations());
parts = parts.override(null, null, null, lockingContext, lockingContext, lockingContext, lockingContext, lockingContext, null, null, null, null);
// + Guard
GuardingStatementOperations guardingOperations = new GuardingStatementOperations(parts.entityWriteOperations(), parts.entityReadOperations(), guard);
StatementOperationParts guardedParts = parts.override(null, null, guardingOperations, guardingOperations, null, null, null, null, null, null, null, null);
return new StatementOperationContainer(guardedParts, parts);
}
Aggregations