Package io.trino.cache
Class SafeCaches
java.lang.Object
io.trino.cache.SafeCaches
- See Also:
-
EvictableCacheEvictableCacheBuilder
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> NonEvictableCache<K, V> buildNonEvictableCache(com.google.common.cache.CacheBuilder<? super K, ? super V> cacheBuilder) static <K,V> NonEvictableLoadingCache<K, V> buildNonEvictableCache(com.google.common.cache.CacheBuilder<? super K, ? super V> cacheBuilder, com.google.common.cache.CacheLoader<? super K, V> cacheLoader) static <K,V> NonKeyEvictableCache<K, V> buildNonEvictableCacheWithWeakInvalidateAll(com.google.common.cache.CacheBuilder<? super K, ? super V> cacheBuilder) Builds a cache that supportsCache.invalidateAll()with best-effort semantics: there is no guarantee that cache is empty afterinvalidateAll()returns, or that subsequent read will not see stale state.static <K,V> NonKeyEvictableLoadingCache<K, V> buildNonEvictableCacheWithWeakInvalidateAll(com.google.common.cache.CacheBuilder<? super K, ? super V> cacheBuilder, com.google.common.cache.CacheLoader<? super K, V> cacheLoader) Builds a cache that supportsCache.invalidateAll()with best-effort semantics: there is no guarantee that cache is empty afterinvalidateAll()returns, or that subsequent read will not see stale state.
-
Method Details
-
buildNonEvictableCache
public static <K,V> NonEvictableCache<K,V> buildNonEvictableCache(com.google.common.cache.CacheBuilder<? super K, ? super V> cacheBuilder) -
buildNonEvictableCacheWithWeakInvalidateAll
public static <K,V> NonKeyEvictableCache<K,V> buildNonEvictableCacheWithWeakInvalidateAll(com.google.common.cache.CacheBuilder<? super K, ? super V> cacheBuilder) Builds a cache that supportsCache.invalidateAll()with best-effort semantics: there is no guarantee that cache is empty afterinvalidateAll()returns, or that subsequent read will not see stale state. -
buildNonEvictableCache
public static <K,V> NonEvictableLoadingCache<K,V> buildNonEvictableCache(com.google.common.cache.CacheBuilder<? super K, ? super V> cacheBuilder, com.google.common.cache.CacheLoader<? super K, V> cacheLoader) -
buildNonEvictableCacheWithWeakInvalidateAll
public static <K,V> NonKeyEvictableLoadingCache<K,V> buildNonEvictableCacheWithWeakInvalidateAll(com.google.common.cache.CacheBuilder<? super K, ? super V> cacheBuilder, com.google.common.cache.CacheLoader<? super K, V> cacheLoader) Builds a cache that supportsCache.invalidateAll()with best-effort semantics: there is no guarantee that cache is empty afterinvalidateAll()returns, or that subsequent read will not see stale state.
-