public interface IlrRulesetCache
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.
| 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.
|
IlrXURuleset getRuleset(java.lang.String canonicalRulesetPath, java.lang.ClassLoader xomClassLoader)
canonicalRulesetPath - The canonical path of the rulesetxomClassLoader - The classloader containing the XOMIlrXURuleset getDeprecatedRuleset(java.lang.String canonicalRulesetPath, java.lang.ClassLoader xomClassLoader)
canonicalRulesetPath - The canonical ruleset path of the rulesetxomClassLoader - The classloader containing the XOMvoid addRuleset(IlrXURuleset executableRuleset)
executableRuleset - The added rulesetvoid initialize(java.util.logging.Logger logger,
java.util.Map<java.lang.String,java.lang.String> props,
IlrRulesetUsageInformationMonitor monitor)
throws IlrRulesetCacheException
This method is called once before any other methods.
IlrRulesetCacheException - Thrown to indicate that the cache cannot be
initializedlogger - The logger to log messagesprops - 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.void rulesetChanged(java.lang.String canonicalRulesetPath)
Typically, the implementation must move the corresponding ruleset entries to the subcache of deprecated rulesets.
canonicalRulesetPath - The canonical path of the modified ruleset.void clear()
© Copyright IBM Corp. 1987, 2017