org.apache.hc.client5.http.impl.cache

## Class DefaultAsyncCacheInvalidator

- java.lang.Object
- - org.apache.hc.client5.http.impl.cache.DefaultAsyncCacheInvalidator

- All Implemented Interfaces:
    HttpAsyncCacheInvalidator

      @Contract(threading=STATELESS)
      @Internal
      public class DefaultAsyncCacheInvalidator
      extends Object
      implements HttpAsyncCacheInvalidator

  Given a particular HTTP request / response pair, flush any cache entries that this exchange would invalidate.
  Since:
    5.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DefaultAsyncCacheInvalidator` | `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAsyncCacheInvalidator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.function.Resolver<URI,String> cacheKeyResolver, HttpAsyncCacheStorage storage, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)` Flush `HttpCacheEntry`s 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.function.Resolver<URI,String> cacheKeyResolver, HttpAsyncCacheStorage storage, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)` Flush `HttpCacheEntry`s invalidated by the given request.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final DefaultAsyncCacheInvalidator INSTANCE

  - ### Constructor Detail

    - #### DefaultAsyncCacheInvalidator

          public DefaultAsyncCacheInvalidator()

  - ### Method Detail

    - #### 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.function.Resolver<URI,String> cacheKeyResolver,
                                                                                         HttpAsyncCacheStorage storage,
                                                                                         org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)

      Description copied from interface: `HttpAsyncCacheInvalidator`
      Flush `HttpCacheEntry`s invalidated by the given request.
      Specified by:
        `flushCacheEntriesInvalidatedByRequest` in interface `HttpAsyncCacheInvalidator`
      Parameters:
        `host` - backend host
        `request` - request message
        `cacheKeyResolver` - cache key resolver used by cache storage
        `storage` - internal cache storage
        `callback` - result callback

    - #### 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.function.Resolver<URI,String> cacheKeyResolver,
                                                                                          HttpAsyncCacheStorage storage,
                                                                                          org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)

      Description copied from interface: `HttpAsyncCacheInvalidator`
      Flush `HttpCacheEntry`s invalidated by the given message exchange.
      Specified by:
        `flushCacheEntriesInvalidatedByExchange` in interface `HttpAsyncCacheInvalidator`
      Parameters:
        `host` - backend host
        `request` - request message
        `response` - response message
        `cacheKeyResolver` - cache key resolver used by cache storage
        `storage` - internal cache storage
        `callback` - result callback

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.