From e69ae823634c5185da15e8933eb4dadb799bd84e Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 21 Feb 2022 21:32:34 +0100 Subject: [PATCH] Update stale references to EvictableLoadingCache The class was removed in 39046208f1f96844f8d1bc2984f428af10aca713. --- .mvn/modernizer/violations.xml | 4 ++-- .../java/io/trino/collect/cache/NonEvictableLoadingCache.java | 2 +- .../io/trino/collect/cache/NonEvictableLoadingCacheImpl.java | 2 +- .../io/trino/collect/cache/NonKeyEvictableLoadingCache.java | 4 ++-- .../trino/collect/cache/NonKeyEvictableLoadingCacheImpl.java | 4 ++-- .../src/main/java/io/trino/collect/cache/SafeCaches.java | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.mvn/modernizer/violations.xml b/.mvn/modernizer/violations.xml index 39db726ba8ab..70edd8642b06 100644 --- a/.mvn/modernizer/violations.xml +++ b/.mvn/modernizer/violations.xml @@ -57,7 +57,7 @@ com/google/common/cache/CacheBuilder.build:()Lcom/google/common/cache/Cache; 1.8 - Guava Cache has concurrency issues around invalidation and ongoing loads. Use EvictableCache, EvictableLoadingCache, or SafeCaches to build caches. + Guava Cache has concurrency issues around invalidation and ongoing loads. Use EvictableCacheBuilder or SafeCaches to build caches. See https://github.com/trinodb/trino/issues/10512 for more information and see https://github.com/trinodb/trino/issues/10512#issuecomment-1016221168 for why Caffeine does not solve the problem. @@ -65,7 +65,7 @@ com/google/common/cache/CacheBuilder.build:(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/LoadingCache; 1.8 - Guava LoadingCache has concurrency issues around invalidation and ongoing loads. Use EvictableCache, EvictableLoadingCache, or SafeCaches to build caches. + Guava LoadingCache has concurrency issues around invalidation and ongoing loads. Use EvictableCacheBuilder or SafeCaches to build caches. See https://github.com/trinodb/trino/issues/10512 for more information and see https://github.com/trinodb/trino/issues/10512#issuecomment-1016221168 for why Caffeine does not solve the problem. diff --git a/lib/trino-collect/src/main/java/io/trino/collect/cache/NonEvictableLoadingCache.java b/lib/trino-collect/src/main/java/io/trino/collect/cache/NonEvictableLoadingCache.java index ce3ece2459d6..35ae03620a50 100644 --- a/lib/trino-collect/src/main/java/io/trino/collect/cache/NonEvictableLoadingCache.java +++ b/lib/trino-collect/src/main/java/io/trino/collect/cache/NonEvictableLoadingCache.java @@ -20,7 +20,7 @@ public interface NonEvictableLoadingCache extends NonKeyEvictableLoadingCache { /** - * @deprecated Not supported. Use {@link EvictableLoadingCache} cache implementation instead. + * @deprecated Not supported. Use {@link EvictableCacheBuilder} to build a cache instead. */ @Deprecated @Override diff --git a/lib/trino-collect/src/main/java/io/trino/collect/cache/NonEvictableLoadingCacheImpl.java b/lib/trino-collect/src/main/java/io/trino/collect/cache/NonEvictableLoadingCacheImpl.java index 19450fe15c61..2923e26f7568 100644 --- a/lib/trino-collect/src/main/java/io/trino/collect/cache/NonEvictableLoadingCacheImpl.java +++ b/lib/trino-collect/src/main/java/io/trino/collect/cache/NonEvictableLoadingCacheImpl.java @@ -29,7 +29,7 @@ final class NonEvictableLoadingCacheImpl public void invalidateAll() { throw new UnsupportedOperationException("invalidateAll does not invalidate ongoing loads, so a stale value may remain in the cache for ever. " + - "Use EvictableLoadingCache if you need invalidation, or use SafeCaches.buildNonEvictableCacheWithWeakInvalidateAll() " + + "Use EvictableCacheBuilder if you need invalidation, or use SafeCaches.buildNonEvictableCacheWithWeakInvalidateAll() " + "if invalidateAll is not required for correctness"); } } diff --git a/lib/trino-collect/src/main/java/io/trino/collect/cache/NonKeyEvictableLoadingCache.java b/lib/trino-collect/src/main/java/io/trino/collect/cache/NonKeyEvictableLoadingCache.java index 126c9eaa22fb..84b04f95b45d 100644 --- a/lib/trino-collect/src/main/java/io/trino/collect/cache/NonKeyEvictableLoadingCache.java +++ b/lib/trino-collect/src/main/java/io/trino/collect/cache/NonKeyEvictableLoadingCache.java @@ -22,14 +22,14 @@ public interface NonKeyEvictableLoadingCache extends LoadingCache { /** - * @deprecated Not supported. Use {@link EvictableLoadingCache} cache implementation instead. + * @deprecated Not supported. Use {@link EvictableCacheBuilder} to build a cache instead. */ @Deprecated @Override void invalidate(Object key); /** - * @deprecated Not supported. Use {@link EvictableLoadingCache} cache implementation instead. + * @deprecated Not supported. Use {@link EvictableCacheBuilder} to build a cache instead. */ @Deprecated @Override diff --git a/lib/trino-collect/src/main/java/io/trino/collect/cache/NonKeyEvictableLoadingCacheImpl.java b/lib/trino-collect/src/main/java/io/trino/collect/cache/NonKeyEvictableLoadingCacheImpl.java index 6a617be48ee8..e0814d33f213 100644 --- a/lib/trino-collect/src/main/java/io/trino/collect/cache/NonKeyEvictableLoadingCacheImpl.java +++ b/lib/trino-collect/src/main/java/io/trino/collect/cache/NonKeyEvictableLoadingCacheImpl.java @@ -40,13 +40,13 @@ protected LoadingCache delegate() public void invalidate(Object key) { throw new UnsupportedOperationException("invalidate(key) does not invalidate ongoing loads, so a stale value may remain in the cache for ever. " + - "Use EvictableLoadingCache if you need invalidation"); + "Use EvictableCacheBuilder if you need invalidation"); } @Override public void invalidateAll(Iterable keys) { throw new UnsupportedOperationException("invalidateAll(keys) does not invalidate ongoing loads, so a stale value may remain in the cache for ever. " + - "Use EvictableLoadingCache if you need invalidation"); + "Use EvictableCacheBuilder if you need invalidation"); } } diff --git a/lib/trino-collect/src/main/java/io/trino/collect/cache/SafeCaches.java b/lib/trino-collect/src/main/java/io/trino/collect/cache/SafeCaches.java index 2f802ff20b3f..c991787c1de6 100644 --- a/lib/trino-collect/src/main/java/io/trino/collect/cache/SafeCaches.java +++ b/lib/trino-collect/src/main/java/io/trino/collect/cache/SafeCaches.java @@ -21,7 +21,7 @@ /** * @see EvictableCache - * @see EvictableLoadingCache + * @see EvictableCacheBuilder */ public final class SafeCaches {