use of org.neo4j.kernel.impl.index.LegacyIndexStore in project neo4j by neo4j.
the class NeoStoreDataSource method buildKernel.
private NeoStoreKernelModule buildKernel(TransactionAppender appender, IndexingService indexingService, StoreReadLayer storeLayer, UpdateableSchemaState updateableSchemaState, LabelScanStore labelScanStore, StorageEngine storageEngine, IndexConfigStore indexConfigStore, TransactionIdStore transactionIdStore, AvailabilityGuard availabilityGuard, Clock clock, PropertyAccessor propertyAccessor) throws KernelException, IOException {
TransactionCommitProcess transactionCommitProcess = commitProcessFactory.create(appender, storageEngine, config);
/*
* This is used by legacy indexes and constraint indexes whenever a transaction is to be spawned
* from within an existing transaction. It smells, and we should look over alternatives when time permits.
*/
Supplier<KernelAPI> kernelProvider = () -> kernelModule.kernelAPI();
boolean releaseSchemaLockWhenBuildingConstratinIndexes = config.get(GraphDatabaseSettings.release_schema_lock_while_building_constraint);
ConstraintIndexCreator constraintIndexCreator = new ConstraintIndexCreator(kernelProvider, indexingService, propertyAccessor, releaseSchemaLockWhenBuildingConstratinIndexes);
LegacyIndexStore legacyIndexStore = new LegacyIndexStore(config, indexConfigStore, kernelProvider, legacyIndexProviderLookup);
StatementOperationContainer statementOperationContainer = dependencies.satisfyDependency(buildStatementOperations(storeLayer, autoIndexing, constraintIndexCreator, updateableSchemaState, guard, legacyIndexStore));
TransactionHooks hooks = new TransactionHooks();
KernelTransactions kernelTransactions = life.add(new KernelTransactions(statementLocksFactory, constraintIndexCreator, statementOperationContainer, schemaWriteGuard, transactionHeaderInformationFactory, transactionCommitProcess, indexConfigStore, legacyIndexProviderLookup, hooks, transactionMonitor, availabilityGuard, tracers, storageEngine, procedures, transactionIdStore, clock, accessCapability));
final Kernel kernel = new Kernel(kernelTransactions, hooks, databaseHealth, transactionMonitor, procedures, config);
kernel.registerTransactionHook(transactionEventHandlers);
final NeoStoreFileListing fileListing = new NeoStoreFileListing(storeDir, labelScanStore, indexingService, legacyIndexProviderLookup, storageEngine);
return new NeoStoreKernelModule(transactionCommitProcess, kernel, kernelTransactions, fileListing);
}
Aggregations