Interface Cache
- All Known Implementing Classes:
DefaultCache,NamedCache,NoOpCache,SelectiveCache
public interface Cache
-
Method Summary
Modifier and TypeMethodDescription<T> Tcompute(Object id, BiFunction<? super Object, ? super T, ? extends T> mappingFunction) <T> TcomputeIfAbsent(Object id, Function<? super Object, T> mappingFunction) <T> TcomputeIfPresent(Object id, BiFunction<? super Object, ? super T, ? extends T> mappingFunction) <T> TgetIfPresent(Object id) default <T> TgetOrDefault(Object id, T defaultValue) voidinvalidate(Object id) voiddefault booleanisEmpty()putIfAbsent(Object id, @NonNull Object value) intsize()
-
Method Details
-
put
-
putIfAbsent
-
computeIfAbsent
-
computeIfPresent
-
compute
-
getIfPresent
-
getOrDefault
-
invalidate
-
invalidateAll
void invalidateAll() -
size
int size() -
isEmpty
default boolean isEmpty()
-