/** * Connect the {@code activator} with already existing {@link Activator}s that are fed by the {@code outputSlot} * via a new {@link Activation}. */ protected void registerDependentActivations(OutputSlot<?> outputSlot, Activator activator) { for (InputSlot<?> inputSlot : outputSlot.getOccupiedSlots()) { Arrays.stream(inputSlot.getOwner().getAllOutputs()) .map(this::getCachedActivator) .filter(Objects::nonNull) .map(dependentActivator -> dependentActivator.createActivation(inputSlot.getIndex())) .forEach(activator.getDependentActivations(outputSlot)::add); } }
final Activator activator = this.createdActivators.get(owner); if (activator != null) { requiredActivations.add(activator.createActivation(inputSlot.getIndex()));
/** * Connect the {@code activator} with already existing {@link Activator}s that are fed by the {@code outputSlot} * via a new {@link Activation}. */ protected void registerAsDependentActivation(Activator activator) { for (InputSlot<?> inputSlot : activator.operator.getAllInputs()) { final OutputSlot<?> occupant = inputSlot.getOccupant(); if (Objects.isNull(occupant)) { continue; } final Activator requiredActivator = this.getCachedActivator(occupant); if (requiredActivator == null) { continue; } requiredActivator.getDependentActivations(occupant).add(activator.createActivation(inputSlot.getIndex())); } } }