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

    • match

      public 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)
      Description copied from interface: HttpAsyncCache
      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.
      Specified by:
      match in interface HttpAsyncCache
    • getVariants

      public org.apache.hc.core5.concurrent.Cancellable getVariants(CacheHit hit, org.apache.hc.core5.concurrent.FutureCallback<Collection<CacheHit>> callback)
      Description copied from interface: HttpAsyncCache
      Retrieves variant HttpCacheEntrys for the given hit.
      Specified by:
      getVariants in interface HttpAsyncCache
    • storeInternal

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

      org.apache.hc.core5.concurrent.Cancellable updateInternal(String cacheKey, HttpCacheCASOperation casOperation, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
    • removeInternal

      private void removeInternal(String cacheKey)
    • store

      org.apache.hc.core5.concurrent.Cancellable store(String rootKey, String variantKey, HttpCacheEntry entry, org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
    • store

      public 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, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
      Description copied from interface: HttpAsyncCache
      Stores HttpRequest / HttpResponse exchange details in the cache.
      Specified by:
      store in interface HttpAsyncCache
    • update

      public 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, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
      Description copied from interface: HttpAsyncCache
      Updates HttpCacheEntry using details from a 304 HttpResponse and updates the root entry if the given cache entry represents a variant.
      Specified by:
      update in interface HttpAsyncCache
    • storeFromNegotiated

      public 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, Instant requestSent, Instant responseReceived, org.apache.hc.core5.concurrent.FutureCallback<CacheHit> callback)
      Description copied from interface: HttpAsyncCache
      Stores HttpRequest / HttpResponse exchange details in the cache from the negotiated HttpCacheEntry.
      Specified by:
      storeFromNegotiated in interface HttpAsyncCache
    • evictAll

      private void evictAll(HttpCacheEntry root, String rootKey)
    • evict

      private org.apache.hc.core5.concurrent.Cancellable evict(String rootKey)
    • evict

      private org.apache.hc.core5.concurrent.Cancellable evict(String rootKey, org.apache.hc.core5.http.HttpResponse response)
    • evictInvalidatedEntries

      public 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<Boolean> callback)
      Description copied from interface: HttpAsyncCache
      Evicts HttpCacheEntrys invalidated by the given message exchange.
      Specified by:
      evictInvalidatedEntries in interface HttpAsyncCache