Class AbstractCaffeineCache<K,V>

java.lang.Object
ru.tinkoff.kora.cache.caffeine.AbstractCaffeineCache<K,V>
All Implemented Interfaces:
ru.tinkoff.kora.cache.Cache<K,V>, CaffeineCache<K,V>

public abstract class AbstractCaffeineCache<K,V> extends Object implements CaffeineCache<K,V>
  • Constructor Details

  • Method Details

    • get

      public V get(@Nonnull K key)
      Specified by:
      get in interface ru.tinkoff.kora.cache.Cache<K,V>
    • get

      @Nonnull public Map<K,V> get(@Nonnull Collection<K> keys)
      Specified by:
      get in interface ru.tinkoff.kora.cache.Cache<K,V>
    • getAll

      @Nonnull public Map<K,V> getAll()
      Specified by:
      getAll in interface CaffeineCache<K,V>
      Returns:
      all values and keys
    • computeIfAbsent

      public V computeIfAbsent(@Nonnull K key, @Nonnull Function<K,V> mappingFunction)
      Specified by:
      computeIfAbsent in interface ru.tinkoff.kora.cache.Cache<K,V>
    • computeIfAbsent

      @Nonnull public Map<K,V> computeIfAbsent(@Nonnull Collection<K> keys, @Nonnull Function<Set<K>,Map<K,V>> mappingFunction)
      Specified by:
      computeIfAbsent in interface ru.tinkoff.kora.cache.Cache<K,V>
    • put

      @Nonnull public V put(@Nonnull K key, @Nonnull V value)
      Specified by:
      put in interface ru.tinkoff.kora.cache.Cache<K,V>
    • put

      @Nonnull public Map<K,V> put(@Nonnull Map<K,V> keyAndValues)
      Specified by:
      put in interface ru.tinkoff.kora.cache.Cache<K,V>
    • invalidate

      public void invalidate(@Nonnull K key)
      Specified by:
      invalidate in interface ru.tinkoff.kora.cache.Cache<K,V>
    • invalidate

      public void invalidate(@Nonnull Collection<K> keys)
      Specified by:
      invalidate in interface ru.tinkoff.kora.cache.Cache<K,V>
    • invalidateAll

      public void invalidateAll()
      Specified by:
      invalidateAll in interface ru.tinkoff.kora.cache.Cache<K,V>