Class BasicHttpAsyncCache

java.lang.Object
org.apache.hc.client5.http.impl.cache.BasicHttpAsyncCache
All Implemented Interfaces:
HttpAsyncCache

class BasicHttpAsyncCache extends Object implements HttpAsyncCache
  • Field Details

  • Constructor Details

  • Method Details

    • generateKey

      public String generateKey(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, HttpCacheEntry cacheEntry)
      Specified by:
      generateKey in interface HttpAsyncCache
    • flushCacheEntriesFor

      public 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)
      Description copied from interface: HttpAsyncCache
      Clear all matching HttpCacheEntrys.
      Specified by:
      flushCacheEntriesFor in interface HttpAsyncCache
    • flushCacheEntriesInvalidatedByRequest

      public 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)
      Description copied from interface: HttpAsyncCache
      Flush HttpCacheEntrys invalidated by the given request
      Specified by:
      flushCacheEntriesInvalidatedByRequest in interface HttpAsyncCache
    • flushCacheEntriesInvalidatedByExchange

      public 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)
      Description copied from interface: HttpAsyncCache
      Flush HttpCacheEntrys invalidated by the given message exchange.
      Specified by:
      flushCacheEntriesInvalidatedByExchange in interface HttpAsyncCache
    • storeInCache

      org.apache.hc.core5.concurrent.Cancellable storeInCache(String cacheKey, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, HttpCacheEntry entry, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
    • storeEntry

      org.apache.hc.core5.concurrent.Cancellable storeEntry(String cacheKey, HttpCacheEntry entry, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
    • storeVariantEntry

      org.apache.hc.core5.concurrent.Cancellable storeVariantEntry(String cacheKey, org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest req, HttpCacheEntry entry, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
    • reuseVariantEntryFor

      public org.apache.hc.core5.concurrent.Cancellable reuseVariantEntryFor(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, Variant variant, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
      Description copied from interface: HttpAsyncCache
      Specifies cache should reuse the given cached variant to satisfy requests whose varying headers match those of the given client request.
      Specified by:
      reuseVariantEntryFor in interface HttpAsyncCache
    • updateCacheEntry

      public 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)
      Description copied from interface: HttpAsyncCache
      Update a HttpCacheEntry using a 304 HttpResponse.
      Specified by:
      updateCacheEntry in interface HttpAsyncCache
    • updateVariantCacheEntry

      public 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)
      Description copied from interface: HttpAsyncCache
      Update a specific HttpCacheEntry representing a cached variant using a 304 HttpResponse.
      Specified by:
      updateVariantCacheEntry in interface HttpAsyncCache
    • createCacheEntry

      public 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)
      Description copied from interface: HttpAsyncCache
      Store a HttpResponse in the cache if possible, and return
      Specified by:
      createCacheEntry in interface HttpAsyncCache
    • getCacheEntry

      public 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)
      Description copied from interface: HttpAsyncCache
      Retrieve matching HttpCacheEntry from the cache if it exists
      Specified by:
      getCacheEntry in interface HttpAsyncCache
    • getVariantCacheEntriesWithEtags

      public 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)
      Description copied from interface: HttpAsyncCache
      Retrieve all variants from the cache, if there are no variants then an empty
      Specified by:
      getVariantCacheEntriesWithEtags in interface HttpAsyncCache