com.ibm.configurator.ddm.cache.impl

Class EhCacheService

  • All Implemented Interfaces:
    CacheService


    public class EhCacheService
    extends AbstractCacheService
    A ehcache based cache service to be used to provide caching services for data driven modeling to hold the data fetched from data source.
    • Constructor Summary

      Constructors 
      Constructor and Description
      EhCacheService() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      CacheItem get(java.lang.Object cacheIdentifier)
      This method returns the cache item from the cache for the specified key.
      void init(java.lang.String tenantId, java.util.Map<java.lang.String,java.lang.String> csConfigProperties)
      This method initializes the ehcache configuration.
      void put(CacheItem cacheItem)
      This method stores the cache items in the cache.
      boolean remove(java.lang.Object cacheIdentifier)
      This method removes the cache items identified by the cache key specified.
      void removeAll()
      This method removes all cached items.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EhCacheService

        public EhCacheService()
    • Method Detail

      • init

        public void init(java.lang.String tenantId,
                         java.util.Map<java.lang.String,java.lang.String> csConfigProperties)
                  throws com.comergent.api.apps.configurator.ConfiguratorException
        This method initializes the ehcache configuration.
        Specified by:
        init in interface CacheService
        Overrides:
        init in class AbstractCacheService
        Parameters:
        tenantId - The tenantId
        csConfigProperties - The cache service configuration properties
        Throws:
        com.comergent.api.apps.configurator.ConfiguratorException - If there is an error during initialization.
      • get

        public CacheItem get(java.lang.Object cacheIdentifier)
        Description copied from interface: CacheService
        This method returns the cache item from the cache for the specified key.
        Parameters:
        cacheIdentifier - The cache key.
        Returns:
        The cache item for the specified key or null if the item is not in cache.
      • put

        public void put(CacheItem cacheItem)
        Description copied from interface: CacheService
        This method stores the cache items in the cache.
        Parameters:
        cacheItem - The cache items to be stored in the cache.
      • remove

        public boolean remove(java.lang.Object cacheIdentifier)
        Description copied from interface: CacheService
        This method removes the cache items identified by the cache key specified.
        Parameters:
        cacheIdentifier - The cache key of the cache item to be removed.
        Returns:
        true if the element was removed, false if it was not found in the cache
      • removeAll

        public void removeAll()
        Description copied from interface: CacheService
        This method removes all cached items.