final ExecutionGate outputGate = vertex.getOutputGate(i);
for (int j = 0; j < outputGate.getNumberOfEdges(); ++j) {
final ExecutionEdge outputChannel = outputGate.getEdge(j);
final ExecutionVertex connectedVertex = outputChannel.getInputGate().getVertex();
if (connectedVertex == null) {
LOG.error("Connected vertex is null");
continue;
}
final AbstractInstance instance = connectedVertex.getAllocatedResource().getInstance();
if (instance instanceof DummyInstance) {
continue;
}
Set<ChannelID> channelIDs = entriesToInvalidate.get(instance);
if (channelIDs == null) {
channelIDs = new SerializableHashSet<ChannelID>();
entriesToInvalidate.put(instance, channelIDs);
}
channelIDs.add(outputChannel.getInputChannelID());
}
}
for (int i = 0; i < vertex.getNumberOfInputGates(); ++i) {
final ExecutionGate inputGate = vertex.getInputGate(i);
for (int j = 0; j < inputGate.getNumberOfEdges(); ++j) {
final ExecutionEdge inputChannel = inputGate.getEdge(j);
final ExecutionVertex connectedVertex = inputChannel.getOutputGate().getVertex();
if (connectedVertex == null) {
LOG.error("Connected vertex is null");
continue;
}
final AbstractInstance instance = connectedVertex.getAllocatedResource().getInstance();
if (instance instanceof DummyInstance) {
continue;
}
Set<ChannelID> channelIDs = entriesToInvalidate.get(instance);