Package 

Class GlobalCache

    • Constructor Summary

      Constructors 
      Constructor Description
      GlobalCache(ImmutableConfig conf)
    • Method Summary

      Modifier and Type Method Description
      UrlPool getUrlPool() The url pool, hold on queues of urls to fetch
      Unit setUrlPool(UrlPool urlPool) The url pool, hold on queues of urls to fetch
      FetchingCache getFetchingCache() The fetching cache, an url is added to the cache before fetching and removed from it after fetching
      ConcurrentExpiringLRUCache<String, WebPage> getPageCache() The global page cache, a page will be removed if it's expired or the cache is full
      ConcurrentExpiringLRUCache<String, FeaturedDocument> getDocumentCache() The global document cache, a document will be removed if it's expired or the cache is full
      final ImmutableConfig getConf()
      final Unit resetCaches()
      final Unit clearCaches()
      final Unit putPDCache(WebPage page, FeaturedDocument document) Put page and document to cache
      final Unit removePDCache(String url) Remove item from page cache and document cache
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GlobalCache

        GlobalCache(ImmutableConfig conf)
    • Method Detail

      • getUrlPool

         UrlPool getUrlPool()

        The url pool, hold on queues of urls to fetch

      • setUrlPool

         Unit setUrlPool(UrlPool urlPool)

        The url pool, hold on queues of urls to fetch

      • getFetchingCache

         FetchingCache getFetchingCache()

        The fetching cache, an url is added to the cache before fetching and removed from it after fetching

      • getPageCache

         ConcurrentExpiringLRUCache<String, WebPage> getPageCache()

        The global page cache, a page will be removed if it's expired or the cache is full

      • getDocumentCache

         ConcurrentExpiringLRUCache<String, FeaturedDocument> getDocumentCache()

        The global document cache, a document will be removed if it's expired or the cache is full

      • getConf

         final ImmutableConfig getConf()
      • putPDCache

         final Unit putPDCache(WebPage page, FeaturedDocument document)

        Put page and document to cache