Class UnblockingRemovalJvmCache<K,V>
- java.lang.Object
-
- com.atlassian.confluence.impl.vcache.UnblockingRemovalJvmCache<K,V>
-
@Internal public final class UnblockingRemovalJvmCache<K,V> extends Object
JVM Cache that can be cleared without blocking.Unlike normal
JvmCache
, this cache will not block when it is cleared while a value is being generated. It has the following properties:- At most one thread can generate value for a key concurrently.
- Generated value will be returned to the current thread even if the cache was cleared during the value generation.
- Since:
- 5.10.1
-
-
Constructor Summary
Constructors Constructor Description UnblockingRemovalJvmCache(com.atlassian.vcache.VCacheFactory cacheFactory, String name, com.atlassian.vcache.JvmCacheSettings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull V
get(K key, Supplier<? extends V> supplier)
void
removeAll()
-
-
-
Constructor Detail
-
UnblockingRemovalJvmCache
public UnblockingRemovalJvmCache(com.atlassian.vcache.VCacheFactory cacheFactory, String name, com.atlassian.vcache.JvmCacheSettings settings)
-
-