Package play.cache.caffeine
Class NamedCaffeineCache<K,V>
- Object
-
- play.cache.caffeine.NamedCaffeineCache<K,V>
-
- All Implemented Interfaces:
com.github.benmanes.caffeine.cache.AsyncCache<K,V>
public class NamedCaffeineCache<K,V> extends Object implements com.github.benmanes.caffeine.cache.AsyncCache<K,V>
-
-
Constructor Summary
Constructors Constructor Description NamedCaffeineCache(String name, com.github.benmanes.caffeine.cache.AsyncCache<K,V> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConcurrentMap<K,CompletableFuture<V>>
asMap()
CompletableFuture<V>
get(K key, BiFunction<? super K,? super Executor,? extends CompletableFuture<? extends V>> mappingFunction)
CompletableFuture<V>
get(K key, Function<? super K,? extends V> mappingFunction)
CompletableFuture<Map<K,V>>
getAll(Iterable<? extends K> keys, BiFunction<? super Set<? extends K>,? super Executor,? extends CompletableFuture<? extends Map<? extends K,? extends V>>> mappingFunction)
CompletableFuture<Map<K,V>>
getAll(Iterable<? extends K> keys, Function<? super Set<? extends K>,? extends Map<? extends K,? extends V>> mappingFunction)
CompletableFuture<V>
getIfPresent(K key)
String
getName()
void
put(K key, CompletableFuture<? extends V> value)
com.github.benmanes.caffeine.cache.Cache<K,V>
synchronous()
-
-
-
Method Detail
-
getName
public String getName()
-
getIfPresent
@CheckForNull public CompletableFuture<V> getIfPresent(@Nonnull K key)
-
get
@CheckForNull public CompletableFuture<V> get(@Nonnull K key, @Nonnull Function<? super K,? extends V> mappingFunction)
-
get
@Nonnull public CompletableFuture<V> get(@Nonnull K key, @Nonnull BiFunction<? super K,? super Executor,? extends CompletableFuture<? extends V>> mappingFunction)
-
getAll
@Nonnull public CompletableFuture<Map<K,V>> getAll(@Nonnull Iterable<? extends K> keys, @Nonnull Function<? super Set<? extends K>,? extends Map<? extends K,? extends V>> mappingFunction)
-
getAll
@Nonnull public CompletableFuture<Map<K,V>> getAll(@Nonnull Iterable<? extends K> keys, @Nonnull BiFunction<? super Set<? extends K>,? super Executor,? extends CompletableFuture<? extends Map<? extends K,? extends V>>> mappingFunction)
-
put
public void put(@Nonnull K key, @Nonnull CompletableFuture<? extends V> value)
-
asMap
@Nonnull public ConcurrentMap<K,CompletableFuture<V>> asMap()
-
-