Class CacheUtils
java.lang.Object
io.trino.cache.CacheUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K> voidinvalidateAllIf(com.google.common.cache.Cache<K, ?> cache, Predicate<? super K> filterFunction) static <K,V> V uncheckedCacheGet(com.google.common.cache.Cache<K, V> cache, K key, Supplier<V> loader)
-
Method Details
-
uncheckedCacheGet
public static <K,V> V uncheckedCacheGet(com.google.common.cache.Cache<K, V> cache, K key, Supplier<V> loader) - Throws:
com.google.common.util.concurrent.UncheckedExecutionException- whenloaderthrows an unchecked exceptioncom.google.common.util.concurrent.ExecutionError- whenloaderthrows anErrorRuntimeException- whenloaderthrows a checked exception (which should not happen)
-
invalidateAllIf
public static <K> void invalidateAllIf(com.google.common.cache.Cache<K, ?> cache, Predicate<? super K> filterFunction)
-