Class LuteceCacheProducer
java.lang.Object
fr.paris.lutece.portal.service.cache.LuteceCacheProducer
Producer of Lutece107Cache instance
Retrieves a cache instance using @LuteceCache(cacheName = "cacheName", keyType = keyType, ValueType = keyType, enable = enable).
Example:
@Inject @LuteceCache(cacheName = "cacheName", keyType = Integer.class, valueType = String.class, enable = true)
Lutece107Cache<Integer, String> cacheInstance;
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K,V> Lutece107Cache<K, V> produceLuteceCache(LuteceCacheParameterHolder parameterHolder) Retrieves a cache instance using luteceCacheManager.createcache(cacheName cacheName, Configuration c ,enable enable).<K,V> Lutece107Cache<K, V> produceLuteceCache(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint) Retrieves a cache instance using @LuteceCache(cacheName = "cacheName", keyType = keyType, ValueType = keyType, enable=enable).
-
Constructor Details
-
LuteceCacheProducer
public LuteceCacheProducer()
-
-
Method Details
-
produceLuteceCache
@Produces public <K,V> Lutece107Cache<K,V> produceLuteceCache(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint) throws IllegalArgumentException Retrieves a cache instance using @LuteceCache(cacheName = "cacheName", keyType = keyType, ValueType = keyType, enable=enable).Example:
@Inject @LuteceCache(cacheName = "cacheName", keyType = Integer.class, valueType = String.class, enable=true) Lutece107Cache<Integer, String> cacheInstance;- Type Parameters:
K- the type of keys maintained the cacheV- the type of cached values- Parameters:
injectionPoint- the injectionPoint- Returns:
- The Lutece107Cache instance
- Throws:
IllegalArgumentException
-
produceLuteceCache
@Produces public <K,V> Lutece107Cache<K,V> produceLuteceCache(LuteceCacheParameterHolder parameterHolder) throws IllegalArgumentException Retrieves a cache instance using luteceCacheManager.createcache(cacheName cacheName, Configuration c ,enable enable).- Type Parameters:
K- the type of keys maintained the cacheV- the type of cached values- Parameters:
parameterHolder- the luteceCacheParameterHolder- Returns:
- The Lutece107Cache instance
- Throws:
IllegalArgumentException
-