Interface HttpAsyncCache

All Known Implementing Classes:
BasicHttpAsyncCache

interface HttpAsyncCache
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hc.core5.concurrent.Cancellable
    createCacheEntry(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, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
    Store a HttpResponse in the cache if possible, and return
    org.apache.hc.core5.concurrent.Cancellable
    flushCacheEntriesFor(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
    Clear all matching HttpCacheEntrys.
    org.apache.hc.core5.concurrent.Cancellable
    flushCacheEntriesInvalidatedByExchange(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<Boolean> callback)
    Flush HttpCacheEntrys invalidated by the given message exchange.
    org.apache.hc.core5.concurrent.Cancellable
    flushCacheEntriesInvalidatedByRequest(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
    Flush HttpCacheEntrys invalidated by the given request
    generateKey(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, HttpCacheEntry cacheEntry)
     
    org.apache.hc.core5.concurrent.Cancellable
    getCacheEntry(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
    Retrieve matching HttpCacheEntry from the cache if it exists
    org.apache.hc.core5.concurrent.Cancellable
    getVariantCacheEntriesWithEtags(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<Map<String,Variant>> callback)
    Retrieve all variants from the cache, if there are no variants then an empty
    org.apache.hc.core5.concurrent.Cancellable
    reuseVariantEntryFor(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest req, Variant variant, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
    Specifies cache should reuse the given cached variant to satisfy requests whose varying headers match those of the given client request.
    org.apache.hc.core5.concurrent.Cancellable
    updateCacheEntry(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, HttpCacheEntry stale, org.apache.hc.core5.http.HttpResponse originResponse, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
    Update a HttpCacheEntry using a 304 HttpResponse.
    org.apache.hc.core5.concurrent.Cancellable
    updateVariantCacheEntry(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse originResponse, Variant variant, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
    Update a specific HttpCacheEntry representing a cached variant using a 304 HttpResponse.
  • Method Details

    • generateKey

      String generateKey(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, HttpCacheEntry cacheEntry)
    • flushCacheEntriesFor

      org.apache.hc.core5.concurrent.Cancellable flushCacheEntriesFor(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
      Clear all matching HttpCacheEntrys.
    • flushCacheEntriesInvalidatedByRequest

      org.apache.hc.core5.concurrent.Cancellable flushCacheEntriesInvalidatedByRequest(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
      Flush HttpCacheEntrys invalidated by the given request
    • flushCacheEntriesInvalidatedByExchange

      org.apache.hc.core5.concurrent.Cancellable flushCacheEntriesInvalidatedByExchange(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<Boolean> callback)
      Flush HttpCacheEntrys invalidated by the given message exchange.
    • getCacheEntry

      org.apache.hc.core5.concurrent.Cancellable getCacheEntry(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
      Retrieve matching HttpCacheEntry from the cache if it exists
    • getVariantCacheEntriesWithEtags

      org.apache.hc.core5.concurrent.Cancellable getVariantCacheEntriesWithEtags(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<Map<String,Variant>> callback)
      Retrieve all variants from the cache, if there are no variants then an empty
    • createCacheEntry

      org.apache.hc.core5.concurrent.Cancellable createCacheEntry(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, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
      Store a HttpResponse in the cache if possible, and return
    • updateCacheEntry

      org.apache.hc.core5.concurrent.Cancellable updateCacheEntry(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, HttpCacheEntry stale, org.apache.hc.core5.http.HttpResponse originResponse, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
      Update a HttpCacheEntry using a 304 HttpResponse.
    • updateVariantCacheEntry

      org.apache.hc.core5.concurrent.Cancellable updateVariantCacheEntry(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.HttpResponse originResponse, Variant variant, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
      Update a specific HttpCacheEntry representing a cached variant using a 304 HttpResponse.
    • reuseVariantEntryFor

      org.apache.hc.core5.concurrent.Cancellable reuseVariantEntryFor(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest req, Variant variant, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
      Specifies cache should reuse the given cached variant to satisfy requests whose varying headers match those of the given client request.