All Known Implementing Classes:
DefaultCache, NamedCache, NoOpCache, SelectiveCache

public interface Cache
  • Method Details

    • put

      Object put(Object id, @NonNull @NonNull Object value)
    • putIfAbsent

      Object putIfAbsent(Object id, @NonNull @NonNull Object value)
    • computeIfAbsent

      <T> T computeIfAbsent(Object id, Function<? super Object,T> mappingFunction)
    • computeIfPresent

      <T> T computeIfPresent(Object id, BiFunction<? super Object,? super T,? extends T> mappingFunction)
    • compute

      <T> T compute(Object id, BiFunction<? super Object,? super T,? extends T> mappingFunction)
    • getIfPresent

      <T> T getIfPresent(Object id)
    • getOrDefault

      default <T> T getOrDefault(Object id, T defaultValue)
    • invalidate

      void invalidate(Object id)
    • invalidateAll

      void invalidateAll()
    • size

      int size()
    • isEmpty

      default boolean isEmpty()