Class CacheUtils

java.lang.Object
io.trino.cache.CacheUtils

public final class CacheUtils extends Object
  • 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 - when loader throws an unchecked exception
      com.google.common.util.concurrent.ExecutionError - when loader throws an Error
      RuntimeException - whenloader throws a checked exception (which should not happen)
    • invalidateAllIf

      public static <K> void invalidateAllIf(com.google.common.cache.Cache<K,?> cache, Predicate<? super K> filterFunction)