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

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

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

      @Nonnull public CompletableFuture<V> get(@Nonnull K key, @Nonnull BiFunction<? super K,? super Executor,? extends CompletableFuture<? extends V>> mappingFunction)
      Specified by:
      get in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • 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)
      Specified by:
      getAll in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • 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)
      Specified by:
      getAll in interface com.github.benmanes.caffeine.cache.AsyncCache<K,V>
    • put

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

      @Nonnull 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>