Interface MatchCache


public interface MatchCache
Caches boolean results of matcher evaluations.

Implementations must be thread-safe. A null result from get(Object) means that the key is not cached; Boolean.TRUE and Boolean.FALSE represent cached matches and non-matches, respectively.

Since:
4.27
Author:
Eike Stepper
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The product group used to configure match-cache implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(Object key)
    Returns the cached result for the given key, or null if no result is cached.
    void
    put(Object key, boolean match)
    Caches the result for the given key.
  • Field Details

    • PRODUCT_GROUP

      static final String PRODUCT_GROUP
      The product group used to configure match-cache implementations.
      See Also:
  • Method Details

    • get

      Boolean get(Object key)
      Returns the cached result for the given key, or null if no result is cached.
      Parameters:
      key - the matcher result key
      Returns:
      the cached result, or null on a cache miss
    • put

      void put(Object key, boolean match)
      Caches the result for the given key.
      Parameters:
      key - the matcher result key
      match - whether the matcher matched