Class CaffeineLoadingCache<K,V>

java.lang.Object
org.jdbi.v3.cache.caffeine.CaffeineLoadingCache<K,V>
Type Parameters:
K - The key type.
V - The value type.
All Implemented Interfaces:
JdbiCache<K,V>

@Deprecated(forRemoval=true, since="3.50") public final class CaffeineLoadingCache<K,V> extends Object implements JdbiCache<K,V>
Deprecated, for removal: This API element is subject to removal in a future version.
should not be public API
Cache implementation using the caffeine cache library.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(K key)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the cached value for a key.
    com.github.benmanes.caffeine.cache.stats.CacheStats
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return implementation specific statistics for the cache object.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a cached value for a key.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public V get(K key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: JdbiCache
      Returns the cached value for a key.
      Specified by:
      get in interface JdbiCache<K,V>
      Parameters:
      key - The key value. Must not be null.
      Returns:
      The cached value or null if no value was cached.
    • getWithLoader

      public V getWithLoader(K key, JdbiCacheLoader<K,V> loader)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: JdbiCache
      Returns a cached value for a key. If no value is cached, create a new value using the provided cache loader.
      Specified by:
      getWithLoader in interface JdbiCache<K,V>
      Parameters:
      key - The key value. Must not be null.
      loader - A JdbiCacheLoader implementation. May be called with the provided key value.
      Returns:
      The cached value or null if no value was cached.
    • getStats

      public com.github.benmanes.caffeine.cache.stats.CacheStats getStats()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: JdbiCache
      Return implementation specific statistics for the cache object. This can be used to expose statistic information about the underlying implementation.
      Specified by:
      getStats in interface JdbiCache<K,V>
      Returns:
      An implementation specific object