Package org.comroid.uniform.cache
Class ProvidedCache<K,V>
- java.lang.Object
-
- org.comroid.uniform.cache.BasicCache<K,V>
-
- org.comroid.uniform.cache.ProvidedCache<K,V>
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<K,V>>,org.comroid.mutatio.ref.ReferenceMap<K,V,Cache.Reference<K,V>>,org.comroid.mutatio.ref.ReferenceMap.Settable<K,V,Cache.Reference<K,V>>,Cache<K,V>
public class ProvidedCache<K,V> extends BasicCache<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.comroid.uniform.cache.Cache
Cache.Reference<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.concurrent.ExecutorDEFAULT_EXECUTOR-
Fields inherited from class org.comroid.uniform.cache.BasicCache
DEFAULT_LARGE_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description ProvidedCache(int largeThreshold, java.util.concurrent.Executor providerWriteExecutor, java.util.function.Function<K,java.util.concurrent.CompletableFuture<V>> valueProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanProvide()java.util.concurrent.CompletableFuture<V>provide(K key)-
Methods inherited from class org.comroid.uniform.cache.BasicCache
containsKey, containsValue, getReference, iterator, large, pipe, size, stream, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-