Top Description Fields Constructors Methods
org.jabref.logic.pdf.search

public Class PdfIndexerManager

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.file.Path, java.util.HashMap, .Map, org.jabref.model.database.BibDatabaseContext, org.jabref.preferences.FilePreferences, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

A PdfIndexer takes a long time to build. Caching it speeds up.

The PdfIndexer is related to the BibDatabaseContext and the FilePreferences. If the user changes the path of the library or the file preferences, we need to create a new PdfIndexer. Otherwise, we can reuse the existing one.

This manager implements a Object Pool pattern for PdfIndexer.

Field Summary

Modifier and TypeField and Description
private static Map<Path, PdfIndexer>
private static final Logger
private static Map<Path, FilePreferences>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static @NonNull PdfIndexer
getIndexer(BibDatabaseContext context, FilePreferences filePreferences)

public static void
public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

indexerMapback to summary
private static Map<Path, PdfIndexer> indexerMap
LOGGERback to summary
private static final Logger LOGGER
pathFilePreferencesMapback to summary
private static Map<Path, FilePreferences> pathFilePreferencesMap

Constructor Detail

PdfIndexerManagerback to summary
public PdfIndexerManager()

Method Detail

getIndexerback to summary
public static @NonNull PdfIndexer getIndexer(BibDatabaseContext context, FilePreferences filePreferences) throws IOException
shutdownAllIndexersback to summary
public static void shutdownAllIndexers()
shutdownIndexerback to summary
public static void shutdownIndexer(BibDatabaseContext context)