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 Details

  • Constructor Details

    • AbstractRedissonCacheBuilder

      protected AbstractRedissonCacheBuilder(String cacheName)
    • AbstractRedissonCacheBuilder

      protected AbstractRedissonCacheBuilder(CacheBuilder<K,V> builder)
  • Method Details

    • build

      public <K1 extends K, V1 extends V> AxelorCache<K1,V1> build()
      Description copied from class: CacheBuilder
      Builds an AxelorCache which does not automatically load values when keys are requested.
      Specified by:
      build in class CacheBuilder<K,V>
      Type Parameters:
      K1 - the key type of the cache
      V1 - the value type of the cache
      Returns:
      a new AxelorCache instance having the specified configuration
    • build

      public <K1 extends K, V1 extends V> AxelorCache<K1,V1> build(CacheLoader<? super K1,V1> loader)
      Description copied from class: CacheBuilder
      Builds an AxelorCache which either returns an already-loaded value for a given key or atomically computes or retrieves it using the supplied CacheLoader.
      Specified by:
      build in class CacheBuilder<K,V>
      Type Parameters:
      K1 - the key type of the cache
      V1 - the value type of the cache
      Parameters:
      loader - the CacheLoader used to obtain new values
      Returns:
      a new AxelorCache instance having the specified configuration and using the specified loader
    • newOptions

      protected abstract O newOptions()
    • newMapCache

      protected abstract M newMapCache(O options)
    • newRedissonCache

      protected abstract AbstractRedissonCache<K,V,M> newRedissonCache(M cache)
    • configureCache

      protected void configureCache(AbstractRedissonCache<K,V,M> cache)