-
public class GlobalCacheThe global cache
-
-
Field Summary
Fields Modifier and Type Field Description private UrlPoolurlPoolprivate final ConcurrentExpiringLRUCache<String, WebPage>pageCacheprivate final ConcurrentExpiringLRUCache<String, FeaturedDocument>documentCacheprivate final FetchingCachefetchingUrlQueueprivate final ImmutableConfigconf
-
Constructor Summary
Constructors Constructor Description GlobalCache(ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description UrlPoolgetUrlPool()The fetch cache manager, hold on queues of fetch items UnitsetUrlPool(UrlPool urlPool)The fetch cache manager, hold on queues of fetch items ConcurrentExpiringLRUCache<String, WebPage>getPageCache()The global page cache, a page might be removed if it's expired or the cache is full ConcurrentExpiringLRUCache<String, FeaturedDocument>getDocumentCache()The global document cache, a document might be removed if it's expired or the cache is full FetchingCachegetFetchingUrlQueue()final ImmutableConfiggetConf()final UnitresetCaches()final UnitclearCaches()final UnitputPDCache(WebPage page, FeaturedDocument document)Put page and document to cache final UnitremovePDCache(String url)Remove item from page cache and document cache -
-
Method Detail
-
getUrlPool
UrlPool getUrlPool()
The fetch cache manager, hold on queues of fetch items
-
setUrlPool
Unit setUrlPool(UrlPool urlPool)
The fetch cache manager, hold on queues of fetch items
-
getPageCache
ConcurrentExpiringLRUCache<String, WebPage> getPageCache()
The global page cache, a page might be removed if it's expired or the cache is full
-
getDocumentCache
ConcurrentExpiringLRUCache<String, FeaturedDocument> getDocumentCache()
The global document cache, a document might be removed if it's expired or the cache is full
-
getFetchingUrlQueue
FetchingCache getFetchingUrlQueue()
-
getConf
final ImmutableConfig getConf()
-
resetCaches
final Unit resetCaches()
-
clearCaches
final Unit clearCaches()
-
putPDCache
final Unit putPDCache(WebPage page, FeaturedDocument document)
Put page and document to cache
-
removePDCache
final Unit removePDCache(String url)
Remove item from page cache and document cache
-
-
-
-