Interface CacheFactoryBuilder

    • Method Detail

      • getConfigurableCacheFactory

        ConfigurableCacheFactory getConfigurableCacheFactory​(ClassLoader loader)
        Return the default ConfigurableCacheFactory for a given class loader.
        Parameters:
        loader - class loader for which the configuration should be used; must not be null
        Returns:
        the default ConfigurableCacheFactory for a given class loader
      • getConfigurableCacheFactory

        ConfigurableCacheFactory getConfigurableCacheFactory​(String sConfigURI,
                                                             ClassLoader loader)
        Return the ConfigurableCacheFactory for a given URI and class loader.
        Parameters:
        sConfigURI - the configuration URI; must not be null
        loader - class loader for which the configuration should be used; must not be null
        Returns:
        the ConfigurableCacheFactory for a given URI and class loader
      • getConfigurableCacheFactory

        ConfigurableCacheFactory getConfigurableCacheFactory​(String sConfigURI,
                                                             ClassLoader loader,
                                                             ParameterResolver resolver)
        Return the ConfigurableCacheFactory for a given URI and class loader.
        Parameters:
        sConfigURI - the configuration URI; must not be null
        loader - class loader for which the configuration should be used; must not be null
        resolver - the optional ParameterResolver to use to resolve configuration parameters
        Returns:
        the ConfigurableCacheFactory for a given URI and class loader
      • setCacheConfiguration

        void setCacheConfiguration​(ClassLoader loader,
                                   XmlElement xmlConfig)
        Dynamically set the default cache configuration for a given class loader. If a ConfigurableCacheFactory for the given class loader already exists, the factory will be released.
        Parameters:
        loader - class loader for which the configuration should be used; must not be null
        xmlConfig - cache configuration in xml element format
      • setCacheConfiguration

        void setCacheConfiguration​(String sConfigURI,
                                   ClassLoader loader,
                                   XmlElement xmlConfig)
        Dynamically set the cache configuration for a given URI and class loader. If a ConfigurableCacheFactory for the given URI and class loader already exists, the factory will be released.
        Parameters:
        sConfigURI - the configuration URI; must not be null
        loader - class loader for which the configuration should be used; must not be null
        xmlConfig - cache configuration in xml element format
      • setConfigurableCacheFactory

        ConfigurableCacheFactory setConfigurableCacheFactory​(ConfigurableCacheFactory ccf,
                                                             String sConfigURI,
                                                             ClassLoader loader,
                                                             boolean fReplace)
        Dynamically set the ConfigurableCacheFactory for a given URI and class loader. If a ConfigurableCacheFactory for the given URI and class loader already exists and the replacement is requested, the factory will be released.
        Parameters:
        ccf - the ConfigurableCacheFactory instance
        sConfigURI - the configuration URI; must not be null
        loader - class loader for which the configuration should be used; must not be null
        fReplace - specifies whether to replace a ConfigurableCacheFactory if one is already registered
        Returns:
        the previous ConfigurableCacheFactory associated with the URI and loader, if any
        Since:
        Coherence 12.1.2
      • releaseAll

        void releaseAll​(ClassLoader loader)
        Release all ConfigurableCacheFactory objects for a given ClassLoader.
        Parameters:
        loader - the class loader for which all associated cache factories should be released
      • release

        void release​(ConfigurableCacheFactory factory)
        Release the specified ConfigurableCacheFactory.
        Parameters:
        factory - the ConfigurableCacheFactory to release