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 TypeMethodDescriptionvoid
clear()
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) boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
@Nullable CompletableFuture
<V> int
hashCode()
boolean
isEmpty()
keySet()
merge
(K key, CompletableFuture<V> value, BiFunction<? super CompletableFuture<V>, ? super CompletableFuture<V>, ? extends CompletableFuture<V>> remappingFunction) put
(K key, CompletableFuture<V> value) void
putAll
(Map<? extends K, ? extends CompletableFuture<V>> map) putIfAbsent
(K key, CompletableFuture<V> value) boolean
replace
(K key, CompletableFuture<V> value) boolean
replace
(K key, CompletableFuture<V> oldValue, CompletableFuture<V> newValue) int
size()
toString()
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.ConcurrentMap
forEach, getOrDefault, replaceAll
-
Field Details
-
asyncCache
-
-
Constructor Details
-
AsyncAsMapView
AsyncAsMapView(LocalAsyncCache<K, V> asyncCache)
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
size
public int size() -
clear
public void clear() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceConcurrentMap<K,
V> - Specified by:
putIfAbsent
in 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:
computeIfAbsent
in interfaceConcurrentMap<K,
V> - Specified by:
computeIfAbsent
in interfaceMap<K,
V>
-
computeIfPresent
public CompletableFuture<V> computeIfPresent(K key, BiFunction<? super K, ? super CompletableFuture<V>, ? extends CompletableFuture<V>> remappingFunction) - Specified by:
computeIfPresent
in interfaceConcurrentMap<K,
V> - Specified by:
computeIfPresent
in 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
public int hashCode() -
toString
-