diff --git a/.mvn/modernizer/violations.xml b/.mvn/modernizer/violations.xml
index 5a545161dba3..ee23d4983d85 100644
--- a/.mvn/modernizer/violations.xml
+++ b/.mvn/modernizer/violations.xml
@@ -46,7 +46,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.
@@ -54,7 +54,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
{