Top Fields Constructors Methods
org.jabref.logic.pdf

public Class FileAnnotationCache

extends Object
Class Inheritance
Imports
java.nio.file.Path, java.util.List, .Map, org.jabref.logic.FilePreferences, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, org.jabref.model.pdf.FileAnnotation, com.google.common.cache.CacheBuilder, .CacheLoader, .LoadingCache, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private LoadingCache<BibEntry, Map<Path, List<FileAnnotation>>>
private static final int
private static final Logger

Constructor Summary

AccessConstructor and Description
public
FileAnnotationCache()

Creates an empty fil annotation cache.

public

Method Summary

Modifier and TypeMethod and Description
public Map<Path, List<FileAnnotation>>

Returns:

Map containing a list of annotations in a list for each file
getFromCache
(BibEntry
entry for which to get the annotations
entry
)

Note that entry becomes the most recent entry in the cache

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

annotationCacheback to summary
private LoadingCache<BibEntry, Map<Path, List<FileAnnotation>>> annotationCache
CACHE_SIZEback to summary
private static final int CACHE_SIZE
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

FileAnnotationCacheback to summary
public FileAnnotationCache()

Creates an empty fil annotation cache. Required to allow the annotation cache to be injected into views without hitting the bug https://github.com/AdamBien/afterburner.fx/issues/71 .

FileAnnotationCacheback to summary
public FileAnnotationCache(BibDatabaseContext context, FilePreferences filePreferences)

Method Detail

getFromCacheback to summary
public Map<Path, List<FileAnnotation>> getFromCache(BibEntry entry)

Note that entry becomes the most recent entry in the cache

Parameters
entry:BibEntry

entry for which to get the annotations

Returns:Map<Path, List<FileAnnotation>>

Map containing a list of annotations in a list for each file

removeback to summary
public void remove(BibEntry entry)