Skip to content

Commit

Permalink
Update stale references to EvictableLoadingCache
Browse files Browse the repository at this point in the history
The class was removed in 3904620.
  • Loading branch information
findepi authored and losipiuk committed Feb 21, 2022
1 parent 509ac91 commit e69ae82
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .mvn/modernizer/violations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
<violation>
<name>com/google/common/cache/CacheBuilder.build:()Lcom/google/common/cache/Cache;</name>
<version>1.8</version>
<comment>Guava Cache has concurrency issues around invalidation and ongoing loads. Use EvictableCache, EvictableLoadingCache, or SafeCaches to build caches.
<comment>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.</comment>
</violation>

<violation>
<name>com/google/common/cache/CacheBuilder.build:(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/LoadingCache;</name>
<version>1.8</version>
<comment>Guava LoadingCache has concurrency issues around invalidation and ongoing loads. Use EvictableCache, EvictableLoadingCache, or SafeCaches to build caches.
<comment>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.</comment>
</violation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface NonEvictableLoadingCache<K, V>
extends NonKeyEvictableLoadingCache<K, V>
{
/**
* @deprecated Not supported. Use {@link EvictableLoadingCache} cache implementation instead.
* @deprecated Not supported. Use {@link EvictableCacheBuilder} to build a cache instead.
*/
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class NonEvictableLoadingCacheImpl<K, V>
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");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public interface NonKeyEvictableLoadingCache<K, V>
extends LoadingCache<K, V>
{
/**
* @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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ protected LoadingCache<K, V> 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");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* @see EvictableCache
* @see EvictableLoadingCache
* @see EvictableCacheBuilder
*/
public final class SafeCaches
{
Expand Down

0 comments on commit e69ae82

Please sign in to comment.