Interface Cache
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DefaultCache,NamedCache,NoOpCache,SelectiveCache
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidclose()<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) booleancontainsKey(Object id) <T> Tdefault <T> TgetOrDefault(Object id, T defaultValue) default booleanisEmpty()putIfAbsent(Object id, Object value) registerEvictionListener(Consumer<CacheEvictionEvent> listener) <T> Tintsize()
-
Method Details
-
put
-
putIfAbsent
-
computeIfAbsent
-
computeIfPresent
-
compute
-
get
-
getOrDefault
-
containsKey
-
remove
-
clear
void clear() -
size
int size() -
isEmpty
default boolean isEmpty() -
registerEvictionListener
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-