public Message preProcessMessageDebug(final ComputeIntermediateResultMessage msg, final DebugStep debugstep) {
return msg;
}
public Message receiveDebug(final Message message, final BasicOperator from, final DebugStep debugstep) {
Message msg = message;
if (from != null) {
debugstep.stepMessage(from, this, msg);
Map<BasicOperator, Message> received = this.messages.get(msg.getId());
if (received == null) {
received = new HashMap<BasicOperator, Message>();
this.messages.put(msg.getId(), received);
}
received.put(from, msg);
final HashSet<BasicOperator> operatorsWithoutCycles = new HashSet<BasicOperator>();
operatorsWithoutCycles.addAll(this.precedingOperators);
operatorsWithoutCycles.removeAll(this.cycleOperands);
if (!received.keySet().containsAll(operatorsWithoutCycles)) {
return null;
}
if (received.keySet().containsAll(this.precedingOperators)) {
this.messages.remove(msg.getId());
}
msg = msg.merge(received.values(), this);
}
msg = msg.preProcessDebug(this, debugstep);
msg = this.forwardMessageDebug(msg, debugstep);
if (msg == null) {
return null;
} else {
return msg.postProcessDebug(this, debugstep);
}
}