-
public class GlobalCacheThe global cache
-
-
Field Summary
Fields Modifier and Type Field Description private FetchCacheManagerfetchCachesprivate 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 FetchCacheManagergetFetchCaches()The fetch cache manager, hold on queues of fetch items UnitsetFetchCaches(FetchCacheManager fetchCaches)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 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
-
getFetchCaches
FetchCacheManager getFetchCaches()
The fetch cache manager, hold on queues of fetch items
-
setFetchCaches
Unit setFetchCaches(FetchCacheManager fetchCaches)
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()
-
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
-
-
-
-