public interface IAddon extends IMRulesObject, Outable
ConfigDiscovery
.Modifier and Type | Method and Description |
---|---|
IAddon |
clone()
Clones the Addon.
|
String |
getImplementationId()
Unique addon implementation ID.
|
Integer |
getInternalCacheIdentifier()
This method allows to retrieve the internal cache identifier set during the compilation phase.
|
boolean |
isCacheUsed()
Tells if this addon will or not use cached data.
|
boolean |
isInternalCacheIdentifierNeeded()
This method allows to tell the engine if a cache identifier is needed.
|
void |
optimize(ICompilationContext ctxt)
Called automatically at the end of the compilation process on all addons,
allows an addon to perform internal optimization depending on data computed by all other addons during compilation process.
|
void |
resetCachedData(IExecutionContext ctxt)
Tells this addon to reset its cached data, if any.
|
void |
setInternalCacheIdentifier(Integer internalIdentifier)
This method is called internally during the compilation phase, to set an internal cache identifier.
|
boolean |
wasRegistered(ICompilationContext ctxt,
IAddon parent,
AddonInfo info)
Hook called when addon is registered in context.
|
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
String getImplementationId()
void optimize(ICompilationContext ctxt) throws MRuleValidationException
MRuleValidationException
void setInternalCacheIdentifier(Integer internalIdentifier)
internalIdentifier
- Internal identifiergetInternalCacheIdentifier()
Integer getInternalCacheIdentifier()
setInternalCacheIdentifier(Integer)
boolean isInternalCacheIdentifierNeeded()
isCacheUsed()
), but the optimization
process can identify that the cache is not necessary in some cases. To deactivate it, at this point,
the optimizer can't modify the value returned by isCacheUsed()
, but only the value returned
by isInternalCacheIdentifierNeeded()
.setInternalCacheIdentifier(Integer)
boolean isCacheUsed()
isInternalCacheIdentifierNeeded()
.void resetCachedData(IExecutionContext ctxt)
IExecutionContext.resetCachedData(IAddon)
, so to tell
an addon instance to reset its cached data, this method should be called, not the one in IExecutionContext.boolean wasRegistered(ICompilationContext ctxt, IAddon parent, AddonInfo info) throws MRuleValidationException
parent
- Parent from which this instance of addon was registered.info
- Addon info for the currently registered addonMRuleValidationException
IAddon clone()
clone
in interface IMRulesObject