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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Cancellable` | `flushCacheEntriesInvalidatedByExchange(HttpHost host, HttpRequest request, HttpResponse response, Resolver<URI,String> cacheKeyResolver, HttpAsyncCacheStorage storage, FutureCallback<Boolean> callback)` Flush `HttpCacheEntry`s invalidated by the given message exchange.
    `Cancellable` | `flushCacheEntriesInvalidatedByRequest(HttpHost host, HttpRequest request, Resolver<URI,String> cacheKeyResolver, HttpAsyncCacheStorage storage, 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 Cancellable flushCacheEntriesInvalidatedByRequest(HttpHost host,
                                                                   HttpRequest request,
                                                                   Resolver<URI,String> cacheKeyResolver,
                                                                   HttpAsyncCacheStorage storage,
                                                                   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 Cancellable flushCacheEntriesInvalidatedByExchange(HttpHost host,
                                                                    HttpRequest request,
                                                                    HttpResponse response,
                                                                    Resolver<URI,String> cacheKeyResolver,
                                                                    HttpAsyncCacheStorage storage,
                                                                    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.