Class LocalAsyncCache.AsyncAsMapView<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.LocalAsyncCache.AsyncAsMapView<K,V>
- All Implemented Interfaces:
ConcurrentMap<K, CompletableFuture<V>>, Map<K, CompletableFuture<V>>
- Enclosing interface:
LocalAsyncCache<K,V>
public static final class LocalAsyncCache.AsyncAsMapView<K,V>
extends Object
implements ConcurrentMap<K, CompletableFuture<V>>
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()compute(K key, BiFunction<? super K, ? super CompletableFuture<V>, ? extends CompletableFuture<V>> remappingFunction) @Nullable CompletableFuture<V> computeIfAbsent(K key, Function<? super K, ? extends CompletableFuture<V>> mappingFunction) computeIfPresent(K key, BiFunction<? super K, ? super CompletableFuture<V>, ? extends CompletableFuture<V>> remappingFunction) booleancontainsKey(Object key) booleancontainsValue(Object value) Set<Map.Entry<K, CompletableFuture<V>>> entrySet()boolean@Nullable CompletableFuture<V> inthashCode()booleanisEmpty()keySet()merge(K key, CompletableFuture<V> value, BiFunction<? super CompletableFuture<V>, ? super CompletableFuture<V>, ? extends CompletableFuture<V>> remappingFunction) put(K key, CompletableFuture<V> value) voidputAll(Map<? extends K, ? extends CompletableFuture<V>> map) putIfAbsent(K key, CompletableFuture<V> value) booleanreplace(K key, CompletableFuture<V> value) booleanreplace(K key, CompletableFuture<V> oldValue, CompletableFuture<V> newValue) intsize()toString()values()Methods inherited from interface ConcurrentMap
forEach, getOrDefault, replaceAll
-
Field Details
-
asyncCache
-
-
Constructor Details
-
AsyncAsMapView
AsyncAsMapView(LocalAsyncCache<K, V> asyncCache)
-
-
Method Details
-
isEmpty
-
size
-
clear
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V>
-
put
-
putAll
-
replace
-
replace
-
remove
-
remove
-
computeIfAbsent
public @Nullable CompletableFuture<V> computeIfAbsent(K key, Function<? super K, ? extends CompletableFuture<V>> mappingFunction) - Specified by:
computeIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
computeIfAbsentin interfaceMap<K,V>
-
computeIfPresent
public CompletableFuture<V> computeIfPresent(K key, BiFunction<? super K, ? super CompletableFuture<V>, ? extends CompletableFuture<V>> remappingFunction) - Specified by:
computeIfPresentin interfaceConcurrentMap<K,V> - Specified by:
computeIfPresentin interfaceMap<K,V>
-
compute
public CompletableFuture<V> compute(K key, BiFunction<? super K, ? super CompletableFuture<V>, ? extends CompletableFuture<V>> remappingFunction) -
merge
public CompletableFuture<V> merge(K key, CompletableFuture<V> value, BiFunction<? super CompletableFuture<V>, ? super CompletableFuture<V>, ? extends CompletableFuture<V>> remappingFunction) -
keySet
-
values
-
entrySet
-
equals
-
hashCode
-
toString
-