Interface ICacheConfigurationCustomizer
public interface ICacheConfigurationCustomizer
Adapts the JCache configuration of a Lutece cache to a caching provider, for the settings that JCache cannot carry
(the size of a Hazelcast cache, for instance). Implementations are CDI beans, discovered by the core when a cache is
created: a module bringing the API of a provider can implement it without making the core depend on that provider.
-
Method Summary
Modifier and TypeMethodDescription<K,V> javax.cache.configuration.Configuration<K, V> customize(String strCacheName, javax.cache.configuration.Configuration<K, V> configuration, CacheSettings settings) Returns the configuration to create a cache withbooleansupports(javax.cache.spi.CachingProvider provider) Tells whether this customizer applies to a caching provider
-
Method Details
-
supports
boolean supports(javax.cache.spi.CachingProvider provider) Tells whether this customizer applies to a caching provider- Parameters:
provider- the caching provider of the Lutece cache manager- Returns:
- true when
customize(String, Configuration, CacheSettings)must be called for this provider
-
customize
<K,V> javax.cache.configuration.Configuration<K,V> customize(String strCacheName, javax.cache.configuration.Configuration<K, V> configuration, CacheSettings settings) Returns the configuration to create a cache with- Type Parameters:
K- the type of the keysV- the type of the values- Parameters:
strCacheName- the JCache name of the cacheconfiguration- the JCache configuration built by the core (types, store by value or reference, expiry)settings- the Lutece settings of the cache- Returns:
- the configuration to use, the given one or a provider specific one that keeps its settings
-