org.hibernate.search.filter

## Interface FilterCachingStrategy

- All Known Implementing Classes:
    MRUFilterCachingStrategy

      public interface FilterCachingStrategy

  Defines the caching filter strategy implementations of getCachedFilter and addCachedFilter must be thread-safe
  Author:
    Emmanuel Bernard

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `addCachedFilter(FilterKey key, Filter filter)` Deprecated. This method is not used by Hibernate Search anymore and will be removed in a future version. Please implement `addCachedFilter(FilterKey, Query)` instead.
    `default void` | `addCachedFilter(FilterKey key, Query filter)` Propose a candidate filter for caching.
    `Query` | `getCachedFilter(FilterKey key)` Retrieve the cached filter for a given key or null if not cached.
    `void` | `initialize(Properties properties)` Initialize the strategy from the properties.

- - ### Method Detail

    - #### initialize

          void initialize(Properties properties)

      Initialize the strategy from the properties. The Properties must not be changed.
      Parameters:
        `properties` - the caching strategy configuration

    - #### getCachedFilter

          Query getCachedFilter(FilterKey key)

      Retrieve the cached filter for a given key or null if not cached.
      Parameters:
        `key` - the filter key
      Returns:
        the cached filter or null if not cached

    - #### addCachedFilter

          @Deprecated
          default void addCachedFilter(FilterKey key,
                                                   Filter filter)

      Deprecated. This method is not used by Hibernate Search anymore and will be removed in a future version. Please implement `addCachedFilter(FilterKey, Query)` instead.
      Propose a candidate filter for caching
      Parameters:
        `key` - the filter key
        `filter` - the filter to cache

    - #### addCachedFilter

          default void addCachedFilter(FilterKey key,
                                       Query filter)

      Propose a candidate filter for caching.
      Parameters:
        `key` - the filter key
        `filter` - the filter to cache

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved