Class ConfigurationHelper


  • public final class ConfigurationHelper
    extends java.lang.Object
    The configuration for ehcache.

    This class can be populated through:

    Version:
    $Id$
    Author:
    Greg Luck
    • Constructor Detail

      • ConfigurationHelper

        public ConfigurationHelper​(CacheManager cacheManager,
                                   Configuration configuration)
        Only Constructor
        Parameters:
        cacheManager -
        configuration -
    • Method Detail

      • createCachePeerProviders

        public java.util.Map<java.lang.String,​CacheManagerPeerProvider> createCachePeerProviders()
        Tries to load the class specified otherwise defaults to null
        Returns:
        a map of CacheManagerPeerProviders
      • createCachePeerListeners

        public java.util.Map<java.lang.String,​CacheManagerPeerListener> createCachePeerListeners()
        Tries to load the class specified otherwise defaults to null
      • getDiskStorePath

        public final java.lang.String getDiskStorePath()
        Returns:
        the disk store path, or null if not set.
      • createCaches

        public final java.util.Set createCaches()
        Creates unitialised caches for each cache configuration found
        Returns:
        an empty set if there are none,
      • numberOfCachesThatUseDiskStorage

        public final int numberOfCachesThatUseDiskStorage()
        Calculates the number of caches in the configuration that are diskPersistent
      • createCacheDecorators

        public java.util.List<Ehcache> createCacheDecorators​(Ehcache cache)
        Creates decorated ehcaches for the cache, if any configured in ehcache.xml
        Parameters:
        cache - the cache
        Returns:
        List of the decorated ehcaches, if any configured in ehcache.xml otherwise returns empty list
      • createDefaultCacheDecorators

        public static java.util.List<Ehcache> createDefaultCacheDecorators​(Ehcache cache,
                                                                           CacheConfiguration defaultCacheConfiguration,
                                                                           java.lang.ClassLoader loader)
        Creates default cache decorators specified in the default cache configuration if any
        Parameters:
        cache - the underlying cache that will be decorated
        defaultCacheConfiguration - default cache configuration
        loader -
        Returns:
        list of decorated caches
      • getSearchAttributeType

        public static java.lang.Class<?> getSearchAttributeType​(SearchAttribute sa,
                                                                java.lang.ClassLoader loader)
        Deprecated.
        internal use only
        Parameters:
        sa - search attribute
        Returns:
        attribute type as class
      • getConfigurationBean

        public final Configuration getConfigurationBean()
        Returns:
        the Configuration used