Class LocalAsyncCache.AsyncBulkCompleter<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.LocalAsyncCache.AsyncBulkCompleter<K,V>
- All Implemented Interfaces:
BiConsumer<Map<K,
V>, Throwable>
- Enclosing interface:
LocalAsyncCache<K,
V>
public static final class LocalAsyncCache.AsyncBulkCompleter<K,V>
extends Object
implements BiConsumer<Map<K,V>,Throwable>
A function executed asynchronously after a bulk load completes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LocalCache
<K, CompletableFuture<V>> private final Map
<K, CompletableFuture<V>> private final long
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncBulkCompleter
(LocalCache<K, CompletableFuture<V>> cache, Map<K, CompletableFuture<V>> proxies) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
addNewEntries
(Map<K, V> result) Adds to the cache any extra entries computed that were not requested.private void
fillProxies
(Map<K, V> result) Populates the proxies with the computed result.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiConsumer
andThen
-
Field Details
-
cache
-
proxies
-
startTime
private final long startTime
-
-
Constructor Details
-
AsyncBulkCompleter
AsyncBulkCompleter(LocalCache<K, CompletableFuture<V>> cache, Map<K, CompletableFuture<V>> proxies)
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceBiConsumer<K,
V>
-
fillProxies
Populates the proxies with the computed result. -
addNewEntries
Adds to the cache any extra entries computed that were not requested.
-