Class QuartzCacheService

java.lang.Object
fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,JobExecutionResult>
fr.paris.lutece.plugins.scheduler.quartz.service.QuartzCacheService
All Implemented Interfaces:
fr.paris.lutece.portal.service.cache.CacheableService<String,JobExecutionResult>, fr.paris.lutece.portal.service.cache.Lutece107Cache<String,JobExecutionResult>, fr.paris.lutece.portal.service.util.LuteceService, Closeable, Serializable, AutoCloseable, Iterable<javax.cache.Cache.Entry<String,JobExecutionResult>>, javax.cache.Cache<String,JobExecutionResult>

@ApplicationScoped public class QuartzCacheService extends fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,JobExecutionResult>
Cache service to share the execution results of the jobs.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface javax.cache.Cache

    javax.cache.Cache.Entry<K extends Object,V extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    initCache(String strCacheName)
     
    void
    initCache(String strCacheName, boolean bEnable)
    Creates the cache when it is enabled (in database, or by bEnable when the back office enables it) and registers the listener that copies the job results of every instance into the local daemon entries: enabling the cache from the back office goes through this method too, so the listener is never lost.
    void
    initializedService(jakarta.servlet.ServletContext context)
    This method observes the initialization of the ApplicationScoped context.

    Methods inherited from class fr.paris.lutece.portal.service.cache.AbstractCacheableService

    clear, close, containsKey, deregisterCacheEntryListener, enableCache, get, getAll, getAndPut, getAndRemove, getAndReplace, getCache, getCacheManager, getCacheSize, getConfiguration, getFromCache, getInfos, getKeys, initCache, invoke, invokeAll, isCacheEnable, isClosed, isPreventGlobalReset, isPreventReset, isRequired, iterator, loadAll, put, putAll, putIfAbsent, putInCache, registerCacheEntryListener, remove, remove, removeAll, removeAll, removeKey, replace, replace, resetCache, setCache, unwrap

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface fr.paris.lutece.portal.service.cache.CacheableService

    getMaxElements, getMemorySize, getTimeToLive

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • QuartzCacheService

      public QuartzCacheService()
  • Method Details

    • getName

      public String getName()
    • initCache

      public void initCache(String strCacheName)
      Overrides:
      initCache in class fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,JobExecutionResult>
    • initCache

      public void initCache(String strCacheName, boolean bEnable)
      Creates the cache when it is enabled (in database, or by bEnable when the back office enables it) and registers the listener that copies the job results of every instance into the local daemon entries: enabling the cache from the back office goes through this method too, so the listener is never lost.
      Overrides:
      initCache in class fr.paris.lutece.portal.service.cache.AbstractCacheableService<String,JobExecutionResult>
      Parameters:
      strCacheName - the cache name
      bEnable - true to create the cache whatever its status in database
    • initializedService

      public void initializedService(@Observes @Initialized(jakarta.enterprise.context.ApplicationScoped.class) jakarta.servlet.ServletContext context)
      This method observes the initialization of the ApplicationScoped context. It ensures that this CDI beans are instantiated at the application startup.

      This method is triggered automatically by CDI when the ApplicationScoped context is initialized, which typically occurs during the startup of the application server.

      Parameters:
      context - the ServletContext that is initialized. This parameter is observed and injected automatically by CDI when the ApplicationScoped context is initialized.