Class NoopCache<K,V>
java.lang.Object
org.jdbi.v3.cache.noop.NoopCache<K,V>
-
Method Summary
Modifier and TypeMethodDescriptionstatic JdbiCacheBuilder
builder()
Returns a newJdbiCacheBuilder
which can be used to construct the internal caches.Returns the cached value for a key.getStats()
Return implementation specific statistics for the cache object.getWithLoader
(K key, JdbiCacheLoader<K, V> loader) Returns a cached value for a key.
-
Method Details
-
builder
Returns a newJdbiCacheBuilder
which can be used to construct the internal caches.- Returns:
- A
JdbiCacheBuilder
instance.
-
get
-
getWithLoader
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 interfaceJdbiCache<K,
V> - Parameters:
key
- The key value. Must not be null.loader
- AJdbiCacheLoader
implementation. May be called with the provided key value.- Returns:
- The cached value or null if no value was cached.
-
getStats
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.
-