Interface SingleItemCacheable

All Known Implementing Classes:
DefaultSingleItemChainable

public interface SingleItemCacheable
Author:
Jeff Fischer
  • Method Details

    • andEntityInfo

      @Deprecated(since="2.2.2") SingleItemCacheable andEntityInfo(Supplier<EntityInfo> factoryFunction)
      Deprecated.
      Optional. Provide additional, identifying information about the cache member via the factory function. This information is used to influence the cache key, allowing the identifying information to be discerned by other processes (e.g. discrete cache invalidation).
      Parameters:
      factoryFunction - Used to construct additional, identifying information about the cache member
      Returns:
      The chained element
    • andEntityInfo

      SingleItemCacheable andEntityInfo(Function<Stream<?>,List<EntityInfo>> infoFunction)
      Optional. Provide additional, identifying information about the cache member via the factory function. This information is used to influence the cache key, allowing the identifying information to be discerned by other processes (e.g. discrete cache invalidation). The input to the function is the result of computeIfAbsent(Supplier). If the input happens to be streamable, this it's stream is used. Otherwise, a single item list of the specific result of computeIfAbsent is streamed. The output of the function is the one or more info DTO instances targeting entities whose update will target invalidation of this cache.
      Parameters:
      infoFunction - Used to construct additional, identifying information about the cache member(s).
      Returns:
      The chained element
    • computeIfAbsent

      <P> P computeIfAbsent(Supplier<P> compute)