Class ExecutionRun
java.lang.Object
com.soulfiremc.server.script.ExecutionRun
Per-invocation execution state.
Each trigger invocation gets its own ExecutionRun so that concurrent triggers
don't corrupt each other's node output sinks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionawaitNodeOutputs(String nodeId) Waits for a node to produce outputs within this run.booleanIncrements the execution count and checks if the limit has been exceeded.voidpublishNodeOutputs(String nodeId, Map<String, NodeValue> outputs) Publishes node outputs, allowing consumers to receive the latest value.
-
Constructor Details
-
ExecutionRun
public ExecutionRun()
-
-
Method Details
-
awaitNodeOutputs
-
publishNodeOutputs
Publishes node outputs, allowing consumers to receive the latest value. Uses replay().latest() so that producers can emit multiple times (loops work) and consumers always get the most recent value.- Parameters:
nodeId- the node identifieroutputs- the output values
-
incrementAndCheckLimit
public boolean incrementAndCheckLimit()Increments the execution count and checks if the limit has been exceeded.- Returns:
- true if execution is allowed, false if the limit has been exceeded
-