use of org.neo4j.kernel.impl.store.id.IdGeneratorFactory in project neo4j by neo4j.
the class RecordStorageEngineRule method get.
private RecordStorageEngine get(FileSystemAbstraction fs, PageCache pageCache, SchemaIndexProvider schemaIndexProvider, DatabaseHealth databaseHealth, File storeDirectory, Function<BatchTransactionApplierFacade, BatchTransactionApplierFacade> transactionApplierTransformer) {
if (!fs.fileExists(storeDirectory) && !fs.mkdir(storeDirectory)) {
throw new IllegalStateException();
}
IdGeneratorFactory idGeneratorFactory = new EphemeralIdGenerator.Factory();
LabelScanStoreProvider labelScanStoreProvider = nativeLabelScanStoreProvider(storeDirectory, fs, pageCache);
LegacyIndexProviderLookup legacyIndexProviderLookup = mock(LegacyIndexProviderLookup.class);
when(legacyIndexProviderLookup.all()).thenReturn(Iterables.empty());
IndexConfigStore indexConfigStore = new IndexConfigStore(storeDirectory, fs);
JobScheduler scheduler = life.add(new Neo4jJobScheduler());
Config config = Config.defaults();
Supplier<KernelTransactionsSnapshot> txSnapshotSupplier = () -> new KernelTransactionsSnapshot(Collections.emptySet(), 0);
return life.add(new ExtendedRecordStorageEngine(storeDirectory, config, idGeneratorFactory, IdReuseEligibility.ALWAYS, new CommunityIdTypeConfigurationProvider(), pageCache, fs, NullLogProvider.getInstance(), mock(PropertyKeyTokenHolder.class), mock(LabelTokenHolder.class), mock(RelationshipTypeTokenHolder.class), () -> {
}, new StandardConstraintSemantics(), scheduler, mock(TokenNameLookup.class), new ReentrantLockService(), schemaIndexProvider, IndexingService.NO_MONITOR, databaseHealth, labelScanStoreProvider, legacyIndexProviderLookup, indexConfigStore, new SynchronizedArrayIdOrderingQueue(20), txSnapshotSupplier, transactionApplierTransformer));
}
Aggregations