|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Method Summary | |
---|---|
void |
addRuleset(IlrXURuleset executableRuleset)
Adds a ruleset to the cache. |
void |
clear()
All cache contents must be cleared. |
IlrXURuleset |
getDeprecatedRuleset(String canonicalRulesetPath,
ClassLoader xomClassLoader)
Retrieves a ruleset from the subcache of deprecated rulesets. |
IlrXURuleset |
getRuleset(String canonicalRulesetPath,
ClassLoader xomClassLoader)
Retrieves a ruleset. |
void |
initialize(Logger logger,
Map<String,String> props,
IlrRulesetUsageInformationMonitor monitor)
Initializes the cache. |
void |
rulesetChanged(String canonicalRulesetPath)
Notifies the cache that a ruleset has changed. |
Method Detail |
---|
IlrXURuleset getRuleset(String canonicalRulesetPath, ClassLoader xomClassLoader)
canonicalRulesetPath
- The canonical path of the rulesetxomClassLoader
- The classloader containing the XOM
IlrXURuleset getDeprecatedRuleset(String canonicalRulesetPath, ClassLoader xomClassLoader)
canonicalRulesetPath
- The canonical ruleset path of the rulesetxomClassLoader
- The classloader containing the XOM
void addRuleset(IlrXURuleset executableRuleset)
executableRuleset
- The added rulesetvoid initialize(Logger logger, Map<String,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(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()
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |