Class CacheService


  • public final class CacheService
    extends Object
    Provides cache object for cacheable services
    • Method Detail

      • getInstance

        public static CacheService getInstance()
        Gets the unique instance of the CacheService
        Returns:
        The unique instance of the CacheService
      • createCache

        public net.sf.ehcache.Cache createCache​(String strCacheName)
        Create a cache for a given Service
        Parameters:
        strCacheName - The Cache/Service name
        Returns:
        A cache object
      • resetCaches

        public static void resetCaches()
        Reset all caches
      • shutdown

        public void shutdown()
        Shutdown the cache service and the cache manager. Should be called when the webapp is stopped.
      • registerCacheableService

        public static void registerCacheableService​(CacheableService cs)
        Registers a new CacheableService
        Parameters:
        cs - The CacheableService
      • getCacheableServicesList

        public static List<CacheableService> getCacheableServicesList()
        Returns all registered Cacheable services
        Returns:
        A collection containing all registered Cacheable services
      • storeCachesStatus

        public static void storeCachesStatus()
        Stores cache status
      • updateCacheStatus

        public static void updateCacheStatus​(CacheableService cs)
        Update cache status
        Parameters:
        cs - Cacheable Service