ilog.rules.res.xu.ruleset

Interface IlrRulesetCache



  • public interface IlrRulesetCache
    Represents a ruleset cache.

    Implement this interface to create a custom ruleset cache used by the Execution Unit (XU).

    The cache is divided into two separate subcaches: one contains up-to-date rulesets while the other contains the deprecated rulesets.

    The XU uses the subcache of deprecated ruleset to execute a ruleset while parsing its new version.

    The implementation must be thread-safe.

    You set the implementation class in the XU configuration files.

    Since:
    7.1
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addRuleset(IlrXURuleset executableRuleset)
      Adds a ruleset to the cache.
      void clear()
      All cache contents must be cleared.
      IlrXURuleset getDeprecatedRuleset(java.lang.String canonicalRulesetPath, java.lang.ClassLoader xomClassLoader)
      Retrieves a ruleset from the subcache of deprecated rulesets.
      IlrXURuleset getRuleset(java.lang.String canonicalRulesetPath, java.lang.ClassLoader xomClassLoader)
      Retrieves a ruleset.
      void initialize(java.util.logging.Logger logger, java.util.Map<java.lang.String,java.lang.String> props, IlrRulesetUsageInformationMonitor monitor)
      Initializes the cache.
      void rulesetChanged(java.lang.String canonicalRulesetPath)
      Notifies the cache that a ruleset has changed.
    • Method Detail

      • getRuleset

        IlrXURuleset getRuleset(java.lang.String canonicalRulesetPath,
                              java.lang.ClassLoader xomClassLoader)
        Retrieves a ruleset.
        Parameters:
        canonicalRulesetPath - The canonical path of the ruleset
        xomClassLoader - The classloader containing the XOM
        Returns:
        IlrXURuleset The ruleset
      • getDeprecatedRuleset

        IlrXURuleset getDeprecatedRuleset(java.lang.String canonicalRulesetPath,
                                        java.lang.ClassLoader xomClassLoader)
        Retrieves a ruleset from the subcache of deprecated rulesets.
        Parameters:
        canonicalRulesetPath - The canonical ruleset path of the ruleset
        xomClassLoader - The classloader containing the XOM
        Returns:
        IlrXURuleset The ruleset
      • addRuleset

        void addRuleset(IlrXURuleset executableRuleset)
        Adds a ruleset to the cache.
        Parameters:
        executableRuleset - The added ruleset
      • initialize

        void initialize(java.util.logging.Logger logger,
                      java.util.Map<java.lang.String,java.lang.String> props,
                      IlrRulesetUsageInformationMonitor monitor)
                        throws IlrRulesetCacheException
        Initializes the cache.

        This method is called once before any other methods.

        Throws:
        IlrRulesetCacheException - Thrown to indicate that the cache cannot be initialized
        Parameters:
        logger - The logger to log messages
        props - The configuration properties of the cache (as set in the XU configuration files)
        monitor - Information about the ruleset usage. The value can be null if the parameter is not enabled in the XU configuration files.
      • rulesetChanged

        void rulesetChanged(java.lang.String canonicalRulesetPath)
        Notifies the cache that a ruleset has changed.

        Typically, the implementation must move the corresponding ruleset entries to the subcache of deprecated rulesets.

        Parameters:
        canonicalRulesetPath - The canonical path of the modified ruleset.
      • clear

        void clear()
        All cache contents must be cleared.

© Copyright IBM Corp. 1987, 2020