use of org.neo4j.kernel.api.impl.fulltext.FulltextIndexProvider in project neo4j by neo4j.
the class FulltextIndexProviderFactory method newInstance.
@Override
public Lifecycle newInstance(ExtensionContext context, Dependencies dependencies) {
Config config = dependencies.getConfig();
boolean ephemeral = config.get(GraphDatabaseInternalSettings.ephemeral_lucene);
FileSystemAbstraction fileSystemAbstraction = dependencies.fileSystem();
DirectoryFactory directoryFactory = directoryFactory(ephemeral);
JobScheduler scheduler = dependencies.scheduler();
IndexDirectoryStructure.Factory directoryStructureFactory = subProviderDirectoryStructure(context.directory());
TokenHolders tokenHolders = dependencies.tokenHolders();
Log log = dependencies.getLogService().getInternalLog(FulltextIndexProvider.class);
var readOnlyChecker = dependencies.readOnlyChecker();
if (OperationalMode.SINGLE != context.dbmsInfo().operationalMode) {
// if running as part of cluster indexes should be writable to allow catchup process to accept transactions
readOnlyChecker = DatabaseReadOnlyChecker.writable();
}
return new FulltextIndexProvider(DESCRIPTOR, directoryStructureFactory, fileSystemAbstraction, config, tokenHolders, directoryFactory, readOnlyChecker, scheduler, log);
}
Aggregations