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

public Class IndexingTaskManager

extends BackgroundTask<Void>
Class Inheritance
Imports
java.util.List, .Queue, .Set, java.util.concurrent.ConcurrentLinkedQueue, java.util.concurrent.atomic.AtomicInteger, java.util.stream.Collectors, org.jabref.gui.util.BackgroundTask, .TaskExecutor, .UiTaskExecutor, org.jabref.logic.l10n.Localization, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .LinkedFile

Wrapper around PdfIndexer to execute all operations in the background.

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private final Object
private int
private TaskExecutor
private final Queue<Runnable>
Inherited from org.jabref.gui.util.BackgroundTask:
iconMap

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addToIndex(PdfIndexer indexer, List<BibEntry> entries)

public void
addToIndex(PdfIndexer indexer, BibEntry entry)

public void
addToIndex(PdfIndexer indexer, BibEntry entry, List<LinkedFile> linkedFiles)

public AutoCloseable
protected Void
private void
enqueueTask(Runnable indexingTask)

public void
public void
public void
removeFromIndex(PdfIndexer indexer, List<LinkedFile> linkedFiles)

public void
public void
updateIndex(PdfIndexer indexer, BibDatabaseContext databaseContext)

Updates the index by performing a delta analysis of the files already existing in the index and the files in the library.

private void
Inherited from org.jabref.gui.util.BackgroundTask:
cancelexecuteWithgetIcongetProgressgetWorkDonePercentageisCanceledisCanceledPropertymessagePropertyonFailureonFinishedonRunningonSuccessprogressPropertyscheduleWithshowToUsershowToUserthenthenRunthenRuntitlePropertyupdateMessageupdateProgressupdateProgresswillBeRecoveredAutomaticallywillBeRecoveredAutomaticallywithInitialMessageworkDonePercentagePropertywrapwrap

Field Detail

isBlockingNewTasksback to summary
private boolean isBlockingNewTasks
isRunningback to summary
private boolean isRunning
lockback to summary
private final Object lock
numOfIndexedFilesback to summary
private int numOfIndexedFiles
taskExecutorback to summary
private TaskExecutor taskExecutor
taskQueueback to summary
private final Queue<Runnable> taskQueue

Constructor Detail

IndexingTaskManagerback to summary
public IndexingTaskManager(TaskExecutor taskExecutor)

Method Detail

addToIndexback to summary
public void addToIndex(PdfIndexer indexer, List<BibEntry> entries)
addToIndexback to summary
public void addToIndex(PdfIndexer indexer, BibEntry entry)
addToIndexback to summary
public void addToIndex(PdfIndexer indexer, BibEntry entry, List<LinkedFile> linkedFiles)
blockNewTasksback to summary
public AutoCloseable blockNewTasks()
callback to summary
protected Void call() throws Exception

Implements abstract org.jabref.gui.util.BackgroundTask.call.

Annotations
@Override
enqueueTaskback to summary
private void enqueueTask(Runnable indexingTask)
rebuildIndexback to summary
public void rebuildIndex(PdfIndexer indexer)
removeFromIndexback to summary
public void removeFromIndex(PdfIndexer indexer, BibEntry entry)
removeFromIndexback to summary
public void removeFromIndex(PdfIndexer indexer, List<LinkedFile> linkedFiles)
updateDatabaseNameback to summary
public void updateDatabaseName(String name)
updateIndexback to summary
public void updateIndex(PdfIndexer indexer, BibDatabaseContext databaseContext)

Updates the index by performing a delta analysis of the files already existing in the index and the files in the library.

updateProgressback to summary
private void updateProgress()