Package com.apicatalog.jsonld.loader
Class LRUDocumentCache
- java.lang.Object
-
- com.apicatalog.jsonld.loader.LRUDocumentCache
-
- All Implemented Interfaces:
DocumentLoader
public class LRUDocumentCache extends Object implements DocumentLoader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classLRUDocumentCache.CacheKey
-
Constructor Summary
Constructors Constructor Description LRUDocumentCache(DocumentLoader documentLoader, int cacheSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectcreateCacheKey(URI url, DocumentLoaderOptions options)DocumentloadDocument(URI url, DocumentLoaderOptions options)Retrieve a remote document.
-
-
-
Constructor Detail
-
LRUDocumentCache
public LRUDocumentCache(DocumentLoader documentLoader, int cacheSize)
-
-
Method Detail
-
loadDocument
public Document loadDocument(URI url, DocumentLoaderOptions options) throws JsonLdError
Description copied from interface:DocumentLoaderRetrieve a remote document.- Specified by:
loadDocumentin interfaceDocumentLoader- Parameters:
url- of the remote document to fetchoptions- to set the behavior of the loader- Returns:
Documentrepresenting a remote document- Throws:
JsonLdError- if the document loading fails
-
createCacheKey
protected Object createCacheKey(URI url, DocumentLoaderOptions options)
-
-