Package com.axelor.cache.redisson
Class RedissonCacheNativeBuilder<K,V>
java.lang.Object
com.axelor.cache.CacheBuilder<K,V>
com.axelor.cache.redisson.AbstractRedissonCacheBuilder<K,V,org.redisson.api.RMapCacheNative<K,V>,org.redisson.api.options.MapOptions<K,V>>
com.axelor.cache.redisson.RedissonCacheNativeBuilder<K,V>
- Type Parameters:
K- the type of keys maintained by this cacheV- the type of mapped values
public class RedissonCacheNativeBuilder<K,V>
extends AbstractRedissonCacheBuilder<K,V,org.redisson.api.RMapCacheNative<K,V>,org.redisson.api.options.MapOptions<K,V>>
Redisson cache with native eviction builder
This builds an AxelorCache wrapping a RMapCacheNative.
Weak references are not supported in Redisson collections. When either weakKeys or
weakValues are used, TTL is set in order to approximate the behavior.
-
Field Summary
Fields inherited from class com.axelor.cache.redisson.AbstractRedissonCacheBuilder
PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewMapCache(org.redisson.api.options.MapOptions<K, V> options) protected RedissonCacheNative<K, V> newRedissonCache(org.redisson.api.RMapCacheNative<K, V> cache) <K1 extends K,V1 extends V>
CacheBuilder<K1, V1> removalListener(RemovalListener<? super K1, ? super V1> removalListener) Not supported with native eviction.Methods inherited from class com.axelor.cache.redisson.AbstractRedissonCacheBuilder
build, build, configureCacheMethods inherited from class com.axelor.cache.CacheBuilder
expireAfterAccess, expireAfterWrite, fromCacheName, getCacheName, getCacheProviderInfo, getCacheType, getExpireAfterAccess, getExpireAfterWrite, getMaximumSize, getRemovalListener, isWeakKeys, isWeakValues, maximumSize, newBuilder, newInMemoryBuilder, weakKeys, weakValues
-
Constructor Details
-
RedissonCacheNativeBuilder
-
-
Method Details
-
newOptions
- Specified by:
newOptionsin classAbstractRedissonCacheBuilder<K,V, org.redisson.api.RMapCacheNative<K, V>, org.redisson.api.options.MapOptions<K, V>>
-
newMapCache
protected org.redisson.api.RMapCacheNative<K,V> newMapCache(org.redisson.api.options.MapOptions<K, V> options) - Specified by:
newMapCachein classAbstractRedissonCacheBuilder<K,V, org.redisson.api.RMapCacheNative<K, V>, org.redisson.api.options.MapOptions<K, V>>
-
newRedissonCache
- Specified by:
newRedissonCachein classAbstractRedissonCacheBuilder<K,V, org.redisson.api.RMapCacheNative<K, V>, org.redisson.api.options.MapOptions<K, V>>
-
removalListener
public <K1 extends K,V1 extends V> CacheBuilder<K1,V1> removalListener(RemovalListener<? super K1, ? super V1> removalListener) Not supported with native eviction. When removal listener is set, fall back toRedissonCacheBuilder.- Overrides:
removalListenerin classCacheBuilder<K,V> - Parameters:
removalListener- the listener instance- Returns:
- this
CacheBuilderinstance (for chaining)
-