Search in sources :

Example 1 with DatabaseIndexContext

use of org.neo4j.kernel.impl.index.schema.DatabaseIndexContext in project neo4j by neo4j.

the class NativeLuceneFusionIndexProviderFactory30 method create.

@VisibleForTesting
public static FusionIndexProvider create(PageCache pageCache, Path databaseDirectory, FileSystemAbstraction fs, Monitors monitors, String monitorTag, Config config, DatabaseReadOnlyChecker readOnlyChecker, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, PageCacheTracer pageCacheTracer, String databaseName) {
    IndexDirectoryStructure.Factory childDirectoryStructure = subProviderDirectoryStructure(databaseDirectory);
    boolean archiveFailedIndex = config.get(GraphDatabaseInternalSettings.archive_failed_index);
    DatabaseIndexContext databaseIndexContext = DatabaseIndexContext.builder(pageCache, fs, databaseName).withMonitors(monitors).withTag(monitorTag).withReadOnlyChecker(readOnlyChecker).withPageCacheTracer(pageCacheTracer).build();
    GenericNativeIndexProvider generic = new GenericNativeIndexProvider(databaseIndexContext, childDirectoryStructure, recoveryCleanupWorkCollector, config);
    LuceneIndexProvider lucene = IndexProviderFactoryUtil.luceneProvider(fs, childDirectoryStructure, monitors, monitorTag, config, readOnlyChecker);
    return new FusionIndexProvider(generic, lucene, new FusionSlotSelector30(), DESCRIPTOR, directoriesByProvider(databaseDirectory), fs, archiveFailedIndex, readOnlyChecker);
}
Also used : GenericNativeIndexProvider(org.neo4j.kernel.impl.index.schema.GenericNativeIndexProvider) DatabaseIndexContext(org.neo4j.kernel.impl.index.schema.DatabaseIndexContext) IndexDirectoryStructure(org.neo4j.kernel.api.index.IndexDirectoryStructure) LuceneIndexProvider(org.neo4j.kernel.api.impl.schema.LuceneIndexProvider) VisibleForTesting(org.neo4j.util.VisibleForTesting)

Aggregations

LuceneIndexProvider (org.neo4j.kernel.api.impl.schema.LuceneIndexProvider)1 IndexDirectoryStructure (org.neo4j.kernel.api.index.IndexDirectoryStructure)1 DatabaseIndexContext (org.neo4j.kernel.impl.index.schema.DatabaseIndexContext)1 GenericNativeIndexProvider (org.neo4j.kernel.impl.index.schema.GenericNativeIndexProvider)1 VisibleForTesting (org.neo4j.util.VisibleForTesting)1