use of org.neo4j.kernel.impl.api.index.sampling.IndexSamplingController in project neo4j by neo4j.
the class IndexingServiceFactory method createIndexingService.
public static IndexingService createIndexingService(Config config, JobScheduler scheduler, SchemaIndexProviderMap providerMap, IndexStoreView storeView, TokenNameLookup tokenNameLookup, Iterable<IndexRule> indexRules, LogProvider logProvider, IndexingService.Monitor monitor, Runnable schemaStateChangeCallback) {
if (providerMap == null || providerMap.getDefaultProvider() == null) {
throw new IllegalStateException("You cannot run the database without an index provider, " + "please make sure that a valid provider (subclass of " + SchemaIndexProvider.class.getName() + ") is on your classpath.");
}
IndexSamplingConfig samplingConfig = new IndexSamplingConfig(config);
MultiPopulatorFactory multiPopulatorFactory = MultiPopulatorFactory.forConfig(config);
IndexMapReference indexMapRef = new IndexMapReference();
IndexSamplingControllerFactory factory = new IndexSamplingControllerFactory(samplingConfig, storeView, scheduler, tokenNameLookup, logProvider);
IndexSamplingController indexSamplingController = factory.create(indexMapRef);
IndexProxyCreator proxySetup = new IndexProxyCreator(samplingConfig, storeView, providerMap, tokenNameLookup, logProvider);
return new IndexingService(proxySetup, providerMap, indexMapRef, storeView, indexRules, indexSamplingController, tokenNameLookup, scheduler, schemaStateChangeCallback, multiPopulatorFactory, logProvider, monitor);
}
Aggregations