@Override public boolean equals(final Object obj) { if (!(obj instanceof SynchronousCallMessage)) { return false; } if (this == obj) { return true; } final SynchronousCallMessage other = (SynchronousCallMessage) obj; return (this.getTimestamp() == other.getTimestamp()) && this.getSendingExecution().equals(other.getSendingExecution()) && this.getReceivingExecution().equals(other.getReceivingExecution()); }
@Override protected AllocationComponentOperationPair concreteCreatePair(final SynchronousCallMessage callMsg) { final AllocationComponent allocationComponent = callMsg.getReceivingExecution().getAllocationComponent(); final Operation op = callMsg.getReceivingExecution().getOperation(); final AllocationComponentOperationPair destination = AggregatedAllocationComponentOperationCallTreeFilter.this.getSystemEntityFactory() .getAllocationPairFactory().getPairInstanceByPair(allocationComponent, op); // will never be null! return destination; } }
private SynchronousCallMessage createCallMessage(final Execution rootExecution, final Execution prevE, final Execution curE) throws InvalidTraceException { final SynchronousCallMessage message; if (prevE.equals(rootExecution)) { // initial execution callMessage message = new SynchronousCallMessage(curE.getTin(), rootExecution, curE); } else if ((prevE.getEss() + 1) == curE.getEss()) { // usual callMessage with senderComponentName and // receiverComponentName message = new SynchronousCallMessage(curE.getTin(), prevE, curE); } else if (prevE.getEss() < curE.getEss()) { // detect ess incrementation by > 1 final InvalidTraceException ex = new InvalidTraceException( "Ess are only allowed to increment by 1 --" + "but found sequence <" + prevE.getEss() + "," + curE.getEss() + ">" + "(Execution: " + curE + ")"); // don't log and throw // LOG.error("Found invalid trace:" + ex.getMessage()); // don't need the stack trace here throw ex; } else { final String errorMessage = "Unexpected trace: " + prevE + " and " + curE; throw new IllegalStateException(errorMessage); } return message; }
@Override public AllocationComponentOperationPair createPair(final SynchronousCallMessage callMsg) { final AllocationComponent allocationComponent = callMsg.getReceivingExecution().getAllocationComponent(); final Operation op = callMsg.getReceivingExecution().getOperation(); final AllocationComponentOperationPair destination = TraceCallTreeFilter.this.getSystemEntityFactory().getAllocationPairFactory() .getPairInstanceByPair(allocationComponent, op); // will never be null! return destination; } }, mt, TraceCallTreeFilter.this.dotOutputFn + "-" + mt.getTraceId() + ".dot", false, TraceCallTreeFilter.this.shortLabels); // no weights
/** * {@inheritDoc} */ @Override protected AssemblyComponentOperationPair concreteCreatePair(final SynchronousCallMessage callMsg) { final Execution execution = callMsg.getReceivingExecution(); final AssemblyComponent assemblyComponent = execution.getAllocationComponent().getAssemblyComponent(); final Operation op = execution.getOperation(); return this.getSystemEntityFactory().getAssemblyPairFactory().getPairInstanceByPair(assemblyComponent, op); } }