Class TagScriptManager
- java.lang.Object
-
- com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager
-
- Direct Known Subclasses:
ProjectTagManager.ClientTagScriptManager
public class TagScriptManager extends java.lang.Object
The TagScriptManager handles the compilation and execution of tag event scripts. A set of scripts is defined by aTagEventScripts
object, and is compiled into aTagScriptEvaluator
. The tag then invokes events against the evaluator, and the corresponding defined scripts are executed.Execution occurs asynchronously. There is a thread pool of 3 threads available to execute tag scripts, though events per tag will occur sequentially. Each tag may only have up to 5 outstanding events queued for execution at a time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TagScriptManager.FunctionInvokerImpl
protected static class
TagScriptManager.Multikey
protected class
TagScriptManager.TagScriptDispatcher
This is the actual returned evaluator.protected class
TagScriptManager.Task
-
Constructor Summary
Constructors Constructor Description TagScriptManager(CommonContext context, ExecutionManager eMgr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
buildSignature(CommonTagScripts.EventDescriptor ed)
protected static java.lang.String
cleanupCode(java.lang.String code)
This is necessary due to BugzId 4523, where for a period of time we tried to insert blank lines into the script to get the line numbers correct.TagScriptEvaluator
compile(TagEventScripts scripts, TagScriptMonitor status)
Compiles the code in scripts into a TagScriptEvaluator that can be used to invoke events.protected com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager.SourcePyObject
compileCode(ScriptManager sm, CommonTagScripts.EventDescriptor ed, TagEventScripts scripts, TagScriptMonitor status)
protected TagScriptManager.Task
createTask()
protected void
maybeRunCompiledCacheMaintenance(java.util.UUID cacheId)
protected com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager.SourcePyObject
rawCompile(ScriptManager sm, java.lang.String code, CommonTagScripts.EventDescriptor ed, boolean forceUpdate)
-
-
-
Constructor Detail
-
TagScriptManager
public TagScriptManager(CommonContext context, ExecutionManager eMgr)
-
-
Method Detail
-
compile
public TagScriptEvaluator compile(TagEventScripts scripts, TagScriptMonitor status)
Compiles the code in scripts into a TagScriptEvaluator that can be used to invoke events. The underlying code objects may be shared across multiple evaluators produced by this manager.
-
maybeRunCompiledCacheMaintenance
protected void maybeRunCompiledCacheMaintenance(java.util.UUID cacheId)
-
rawCompile
protected com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager.SourcePyObject rawCompile(ScriptManager sm, java.lang.String code, CommonTagScripts.EventDescriptor ed, boolean forceUpdate) throws java.lang.Exception
- Throws:
java.lang.Exception
-
compileCode
protected com.inductiveautomation.ignition.common.sqltags.scripts.TagScriptManager.SourcePyObject compileCode(ScriptManager sm, CommonTagScripts.EventDescriptor ed, TagEventScripts scripts, TagScriptMonitor status)
-
cleanupCode
protected static java.lang.String cleanupCode(java.lang.String code)
This is necessary due to BugzId 4523, where for a period of time we tried to insert blank lines into the script to get the line numbers correct.
-
buildSignature
protected static java.lang.String buildSignature(CommonTagScripts.EventDescriptor ed)
-
createTask
protected TagScriptManager.Task createTask()
-
-