Package org.jdbi.v3.cache.guava
Class GuavaCacheBuilder
java.lang.Object
org.jdbi.v3.cache.guava.GuavaCacheBuilder
- All Implemented Interfaces:
JdbiCacheBuilder
Cache builder using the guava
Cache
object.-
Constructor Summary
ConstructorDescriptionGuavaCacheBuilder
(com.google.common.cache.CacheBuilder<Object, Object> cacheBuilder) Wraps an existingCacheBuilder
for use with Jdbi. -
Method Summary
Modifier and TypeMethodDescription<K,
V> JdbiCache<K, V> build()
<K,
V> JdbiCache<K, V> buildWithLoader
(JdbiCacheLoader<K, V> cacheLoader) static JdbiCacheBuilder
instance()
Returns a newJdbiCacheBuilder
which can be used to construct the internal caches.maxSize
(int maxSize)
-
Constructor Details
-
GuavaCacheBuilder
Wraps an existingCacheBuilder
for use with Jdbi.- Parameters:
cacheBuilder
- ACacheBuilder
instance.
-
-
Method Details
-
instance
Returns a newJdbiCacheBuilder
which can be used to construct the internal caches.- Returns:
- A
JdbiCacheBuilder
instance.
-
build
- Specified by:
build
in interfaceJdbiCacheBuilder
-
buildWithLoader
- Specified by:
buildWithLoader
in interfaceJdbiCacheBuilder
-
maxSize
- Specified by:
maxSize
in interfaceJdbiCacheBuilder
-