public class RecentlyUsedCache
extends java.lang.Object
Constructor and Description |
---|
RecentlyUsedCache() |
Modifier and Type | Method and Description |
---|---|
static void |
accessDocument(java.lang.String document_path)
Marks the document as having been accessed.
|
static void |
accessDocument(java.lang.String uuid,
PDFDoc doc)
Marks the document as having been accessed.
|
static java.lang.String |
getBitmapPathIfExists(java.lang.String document_path)
Get the path to the thumbnail PNG associated with the document.
|
static void |
initializeRecentlyUsedCache(long num_documents,
long max_absolute_space,
double max_percentage_space)
Initialize the Recently used cache with the provided limits.
|
static void |
removeDocument(java.lang.String document_path)
Removes the document from the recently used list.
|
static void |
renameDocument(java.lang.String old_path,
java.lang.String new_path)
Renames a document from the recently used list.
|
static void |
resetCache()
Blast away the cache from the disk completely, removing any thumbnails
and recently used state.
|
public static void removeDocument(java.lang.String document_path)
document_path
- path to the document to remove.public static void renameDocument(java.lang.String old_path, java.lang.String new_path)
old_path
- old path of the document.new_path
- new path of the document.public static void accessDocument(java.lang.String document_path)
document_path
- path to the document being accessed.public static void accessDocument(java.lang.String uuid, PDFDoc doc)
uuid
- Unique ID.doc
- The document.public static java.lang.String getBitmapPathIfExists(java.lang.String document_path)
document_path
- path to the document whose bitmap you want to retrieve.public static void resetCache()
public static void initializeRecentlyUsedCache(long num_documents, long max_absolute_space, double max_percentage_space) throws PDFNetException
num_documents
- the number of documents to track in the recently used list.max_absolute_space
- the maximum space, in bytes, the thumbnails can occupy on disk.max_percentage_space
- the maximum percentage of free space, in range 0 - 1.0, the thumbnails can occupy on disk.PDFNetException