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
ConstructorsModifierConstructorDescriptionprotectedAbstractRedissonCacheBuilder(CacheBuilder<K, V> builder) protectedAbstractRedissonCacheBuilder(String cacheName) -
Method Summary
Modifier and TypeMethodDescription<K1 extends K,V1 extends V>
AxelorCache<K1, V1> build()Builds anAxelorCachewhich 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 anAxelorCachewhich either returns an already-loaded value for a given key or atomically computes or retrieves it using the suppliedCacheLoader.protected voidconfigureCache(AbstractRedissonCache<K, V, M> cache) protected abstract MnewMapCache(O options) protected abstract Oprotected 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:CacheBuilderBuilds anAxelorCachewhich does not automatically load values when keys are requested.- Specified by:
buildin classCacheBuilder<K,V> - Type Parameters:
K1- the key type of the cacheV1- the value type of the cache- Returns:
- a new
AxelorCacheinstance having the specified configuration
-
build
Description copied from class:CacheBuilderBuilds anAxelorCachewhich either returns an already-loaded value for a given key or atomically computes or retrieves it using the suppliedCacheLoader.- Specified by:
buildin classCacheBuilder<K,V> - Type Parameters:
K1- the key type of the cacheV1- the value type of the cache- Parameters:
loader- theCacheLoaderused to obtain new values- Returns:
- a new
AxelorCacheinstance having the specified configuration and using the specified loader
-
newOptions
-
newMapCache
-
newRedissonCache
-
configureCache
-