fr.paris.lutece.portal.service.cache
Class CacheService

java.lang.Object
  extended by fr.paris.lutece.portal.service.cache.CacheService

public final class CacheService
extends java.lang.Object

Provides cache object for cacheable services


Method Summary
 net.sf.ehcache.Cache createCache(java.lang.String strCacheName)
          Create a cache for a given Service
static java.util.List<CacheableService> getCacheableServicesList()
          Returns all registered Cacheable services
static CacheService getInstance()
          Gets the unique instance of the CacheService
static void registerCacheableService(CacheableService cs)
          Registers a new CacheableService
static void registerCacheableService(java.lang.String strName, CacheableService cs)
          Deprecated. use registerCacheableService( CacheableService cs )
static void resetCaches()
          Reset all caches
 void shutdown()
          Shutdown the cache service and the cache manager.
static void storeCachesStatus()
          Stores cache status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(java.lang.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

@Deprecated
public static void registerCacheableService(java.lang.String strName,
                                                       CacheableService cs)
Deprecated. use registerCacheableService( CacheableService cs )

Registers a new CacheableService

Parameters:
strName - The name
cs - The CacheableService

registerCacheableService

public static void registerCacheableService(CacheableService cs)
Registers a new CacheableService

Parameters:
cs - The CacheableService

getCacheableServicesList

public static java.util.List<CacheableService> getCacheableServicesList()
Returns all registered Cacheable services

Returns:
A collection containing all registered Cacheable services

storeCachesStatus

public static void storeCachesStatus()
Stores cache status



Copyright © 2012 Mairie de Paris. All Rights Reserved.