Class NamedCaffeineCache<K,V>

java.lang.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 Details

    • NamedCaffeineCache

      public NamedCaffeineCache(String name, com.github.benmanes.caffeine.cache.AsyncCache<K,V> cache)
  • Method Details

    • getName

      public String getName()
    • getIfPresent

      public CompletableFuture<V> getIfPresent(K key)
      Specified by:
      getIfPresent in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • get

      public CompletableFuture<V> get(K key, Function<? super K,? extends V> mappingFunction)
      Specified by:
      get in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • get

      public CompletableFuture<V> get(K key, BiFunction<? super K,? super Executor,? extends CompletableFuture<? extends V>> mappingFunction)
      Specified by:
      get in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • getAll

      public CompletableFuture<Map<K,V>> getAll(Iterable<? extends K> keys, Function<? super Set<? extends K>,? extends Map<? extends K,? extends V>> mappingFunction)
      Specified by:
      getAll in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • getAll

      public 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)
      Specified by:
      getAll in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • put

      public void put(K key, CompletableFuture<? extends V> value)
      Specified by:
      put in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • asMap

      public ConcurrentMap<K,CompletableFuture<V>> asMap()
      Specified by:
      asMap in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • synchronous

      public com.github.benmanes.caffeine.cache.Cache<K,V> synchronous()
      Specified by:
      synchronous in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>