Interface HttpAsyncCache

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.apache.hc.core5.concurrent.Cancellable evictInvalidatedEntries​(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.concurrent.FutureCallback<java.lang.Boolean> callback)
      Evicts HttpCacheEntrys invalidated by the given message exchange.
      org.apache.hc.core5.concurrent.Cancellable getVariants​(CacheHit hit, org.apache.hc.core5.concurrent.FutureCallback<java.util.Collection<CacheHit>> callback)
      Retrieves variant HttpCacheEntrys for the given hit.
      org.apache.hc.core5.concurrent.Cancellable match​(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<CacheMatch> callback)
      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.
      org.apache.hc.core5.concurrent.Cancellable 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, org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
      Stores HttpRequest / HttpResponse exchange details in the cache.
      org.apache.hc.core5.concurrent.Cancellable 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, org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
      Stores HttpRequest / HttpResponse exchange details in the cache from the negotiated HttpCacheEntry.
      org.apache.hc.core5.concurrent.Cancellable 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, org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
      Updates HttpCacheEntry using details from a 304 HttpResponse and updates the root entry if the given cache entry represents a variant.
    • Method Detail

      • match

        org.apache.hc.core5.concurrent.Cancellable match​(org.apache.hc.core5.http.HttpHost host,
                                                         org.apache.hc.core5.http.HttpRequest request,
                                                         org.apache.hc.core5.concurrent.FutureCallback<CacheMatch> callback)
        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.
      • getVariants

        org.apache.hc.core5.concurrent.Cancellable getVariants​(CacheHit hit,
                                                               org.apache.hc.core5.concurrent.FutureCallback<java.util.Collection<CacheHit>> callback)
        Retrieves variant HttpCacheEntrys for the given hit.
      • store

        org.apache.hc.core5.concurrent.Cancellable 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,
                                                         org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
        Stores HttpRequest / HttpResponse exchange details in the cache.
      • update

        org.apache.hc.core5.concurrent.Cancellable 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,
                                                          org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
        Updates HttpCacheEntry using details from a 304 HttpResponse and updates the root entry if the given cache entry represents a variant.
      • storeFromNegotiated

        org.apache.hc.core5.concurrent.Cancellable 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,
                                                                       org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
        Stores HttpRequest / HttpResponse exchange details in the cache from the negotiated HttpCacheEntry.
      • evictInvalidatedEntries

        org.apache.hc.core5.concurrent.Cancellable evictInvalidatedEntries​(org.apache.hc.core5.http.HttpHost host,
                                                                           org.apache.hc.core5.http.HttpRequest request,
                                                                           org.apache.hc.core5.http.HttpResponse response,
                                                                           org.apache.hc.core5.concurrent.FutureCallback<java.lang.Boolean> callback)
        Evicts HttpCacheEntrys invalidated by the given message exchange.