Interface HttpAsyncCache
- All Known Implementing Classes:
BasicHttpAsyncCache
interface HttpAsyncCache
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.core5.concurrent.CancellablecreateCacheEntry(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 aHttpResponsein the cache if possible, and returnorg.apache.hc.core5.concurrent.CancellableflushCacheEntriesFor(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback) Clear all matchingHttpCacheEntrys.org.apache.hc.core5.concurrent.CancellableflushCacheEntriesInvalidatedByExchange(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) FlushHttpCacheEntrys invalidated by the given message exchange.org.apache.hc.core5.concurrent.CancellableflushCacheEntriesInvalidatedByRequest(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback) FlushHttpCacheEntrys invalidated by the given requestgenerateKey(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, HttpCacheEntry cacheEntry) org.apache.hc.core5.concurrent.CancellablegetCacheEntry(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback) Retrieve matchingHttpCacheEntryfrom the cache if it existsorg.apache.hc.core5.concurrent.CancellablegetVariantCacheEntriesWithEtags(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 emptyorg.apache.hc.core5.concurrent.CancellablereuseVariantEntryFor(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.CancellableupdateCacheEntry(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 aHttpCacheEntryusing a 304HttpResponse.org.apache.hc.core5.concurrent.CancellableupdateVariantCacheEntry(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 specificHttpCacheEntryrepresenting a cached variant using a 304HttpResponse.
-
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 matchingHttpCacheEntrys. -
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) FlushHttpCacheEntrys 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) FlushHttpCacheEntrys 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 matchingHttpCacheEntryfrom 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 aHttpResponsein 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 aHttpCacheEntryusing a 304HttpResponse. -
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 specificHttpCacheEntryrepresenting a cached variant using a 304HttpResponse. -
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.
-