/** * Returns whether the given connection ends in a port that is a node in the dependency graph with * state {@link PortState#RECOMPUTE}. * * <p>This method always returns false if the connection is not within the current parent module. */ private boolean isConnectionToRecomputedNode(RuntimeConnection runtimeConnection) { if (runtimeConnection.getParentModule() == module) { DependencyGraphNode portNode = dependencyGraph.targetNode(runtimeConnection.getToPort()); if (portNode.getPortState() == PortState.RECOMPUTE) { return true; } } return false; }
private CompletableFuture<Void> triggerSelf( RuntimeConnection connection, ExecutionTrace copyFromExecutionTrace) { RuntimeOutPort toPort = (RuntimeOutPort) connection.getToPort(); ExecutionTrace copyToExecutionTrace = ExecutionTrace.empty().resolveOutPort(toPort.getSimpleName()); Object message = new OutPortHasSignal(toPort.getOutIndex()); ActorRef messageTarget = getSelf(); return startCopyAndSendMessage( copyFromExecutionTrace, copyToExecutionTrace, message, messageTarget); }
private CompletableFuture<Void> triggerSubmodule( RuntimeConnection connection, ExecutionTrace copyFromExecutionTrace) { RuntimeInPort toPort = (RuntimeInPort) connection.getToPort(); RuntimeModule toModule = toPort.getModule(); ExecutionTrace copyToExecutionTrace = ExecutionTrace.empty() .resolveContent() .resolveModule(toModule.getSimpleName()) .resolveInPort(toPort.getSimpleName()); Object message = new InPortHasSignal(toPort.getInIndex()); ActorRef messageTarget = getChildExecutor(toModule); return startCopyAndSendMessage( copyFromExecutionTrace, copyToExecutionTrace, message, messageTarget); }