Interface HttpCache

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void evictInvalidatedEntries​(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response)
      Evicts HttpCacheEntrys invalidated by the given message exchange.
      java.util.List<CacheHit> getVariants​(CacheHit hit)
      Retrieves variant HttpCacheEntrys for the given hit.
      CacheMatch match​(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request)
      Returns a result with either a fully matching HttpCacheEntry a partial match with a list of known variants or null if no match could be found.
      CacheHit store​(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse originResponse, org.apache.hc.core5.util.ByteArrayBuffer content, java.time.Instant requestSent, java.time.Instant responseReceived)
      Stores HttpRequest / HttpResponse exchange details in the cache.
      CacheHit storeFromNegotiated​(CacheHit negotiated, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse originResponse, java.time.Instant requestSent, java.time.Instant responseReceived)
      Stores HttpRequest / HttpResponse exchange details in the cache from the negotiated HttpCacheEntry.
      CacheHit update​(CacheHit stale, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse originResponse, java.time.Instant requestSent, java.time.Instant responseReceived)
      Updates HttpCacheEntry using details from a 304 HttpResponse and updates the root entry if the given cache entry represents a variant.
    • Method Detail

      • match

        CacheMatch match​(org.apache.hc.core5.http.HttpHost host,
                         org.apache.hc.core5.http.HttpRequest request)
        Returns a result with either a fully matching HttpCacheEntry a partial match with a list of known variants or null if no match could be found.
      • store

        CacheHit store​(org.apache.hc.core5.http.HttpHost host,
                       org.apache.hc.core5.http.HttpRequest request,
                       org.apache.hc.core5.http.HttpResponse originResponse,
                       org.apache.hc.core5.util.ByteArrayBuffer content,
                       java.time.Instant requestSent,
                       java.time.Instant responseReceived)
        Stores HttpRequest / HttpResponse exchange details in the cache.
      • update

        CacheHit update​(CacheHit stale,
                        org.apache.hc.core5.http.HttpHost host,
                        org.apache.hc.core5.http.HttpRequest request,
                        org.apache.hc.core5.http.HttpResponse originResponse,
                        java.time.Instant requestSent,
                        java.time.Instant responseReceived)
        Updates HttpCacheEntry using details from a 304 HttpResponse and updates the root entry if the given cache entry represents a variant.
      • storeFromNegotiated

        CacheHit storeFromNegotiated​(CacheHit negotiated,
                                     org.apache.hc.core5.http.HttpHost host,
                                     org.apache.hc.core5.http.HttpRequest request,
                                     org.apache.hc.core5.http.HttpResponse originResponse,
                                     java.time.Instant requestSent,
                                     java.time.Instant responseReceived)
        Stores HttpRequest / HttpResponse exchange details in the cache from the negotiated HttpCacheEntry.
      • evictInvalidatedEntries

        void evictInvalidatedEntries​(org.apache.hc.core5.http.HttpHost host,
                                     org.apache.hc.core5.http.HttpRequest request,
                                     org.apache.hc.core5.http.HttpResponse response)
        Evicts HttpCacheEntrys invalidated by the given message exchange.