Search in sources :

Example 1 with IndexSamplingController

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);
}
Also used : IndexSamplingConfig(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig) SchemaIndexProvider(org.neo4j.kernel.api.index.SchemaIndexProvider) IndexSamplingController(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingController) IndexSamplingControllerFactory(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingControllerFactory)

Aggregations

SchemaIndexProvider (org.neo4j.kernel.api.index.SchemaIndexProvider)1 IndexSamplingConfig (org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig)1 IndexSamplingController (org.neo4j.kernel.impl.api.index.sampling.IndexSamplingController)1 IndexSamplingControllerFactory (org.neo4j.kernel.impl.api.index.sampling.IndexSamplingControllerFactory)1