Package com.axelor.cache.redisson
Class AbstractRedissonCacheBuilder<K,V,M extends org.redisson.api.RMap<K,V>,O extends org.redisson.api.options.ExMapOptions<?,K,V>>
java.lang.Object
com.axelor.cache.CacheBuilder<K,V>
com.axelor.cache.redisson.AbstractRedissonCacheBuilder<K,V,M,O>
- Direct Known Subclasses:
RedissonCacheBuilder
,RedissonCacheNativeBuilder
public abstract class AbstractRedissonCacheBuilder<K,V,M extends org.redisson.api.RMap<K,V>,O extends org.redisson.api.options.ExMapOptions<?,K,V>>
extends CacheBuilder<K,V>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractRedissonCacheBuilder
(CacheBuilder<K, V> builder) protected
AbstractRedissonCacheBuilder
(String cacheName) -
Method Summary
Modifier and TypeMethodDescription<K1 extends K,
V1 extends V>
AxelorCache<K1, V1> build()
Builds anAxelorCache
which does not automatically load values when keys are requested.<K1 extends K,
V1 extends V>
AxelorCache<K1, V1> build
(CacheLoader<? super K1, V1> loader) Builds anAxelorCache
which either returns an already-loaded value for a given key or atomically computes or retrieves it using the suppliedCacheLoader
.protected void
configureCache
(AbstractRedissonCache<K, V, M> cache) protected abstract M
newMapCache
(O options) protected abstract O
protected abstract AbstractRedissonCache
<K, V, M> newRedissonCache
(M cache) Methods inherited from class com.axelor.cache.CacheBuilder
expireAfterAccess, expireAfterWrite, fromCacheName, getCacheName, getCacheProviderInfo, getCacheType, getExpireAfterAccess, getExpireAfterWrite, getMaximumSize, getRemovalListener, isWeakKeys, isWeakValues, maximumSize, newBuilder, newInMemoryBuilder, removalListener, weakKeys, weakValues
-
Field Details
-
PREFIX
- See Also:
-
-
Constructor Details
-
AbstractRedissonCacheBuilder
-
AbstractRedissonCacheBuilder
-
-
Method Details
-
build
Description copied from class:CacheBuilder
Builds anAxelorCache
which does not automatically load values when keys are requested.- Specified by:
build
in classCacheBuilder<K,
V> - Type Parameters:
K1
- the key type of the cacheV1
- the value type of the cache- Returns:
- a new
AxelorCache
instance having the specified configuration
-
build
Description copied from class:CacheBuilder
Builds anAxelorCache
which either returns an already-loaded value for a given key or atomically computes or retrieves it using the suppliedCacheLoader
.- Specified by:
build
in classCacheBuilder<K,
V> - Type Parameters:
K1
- the key type of the cacheV1
- the value type of the cache- Parameters:
loader
- theCacheLoader
used to obtain new values- Returns:
- a new
AxelorCache
instance having the specified configuration and using the specified loader
-
newOptions
-
newMapCache
-
newRedissonCache
-
configureCache
-