@Override public int compare(final AbstractMessage o1, final AbstractMessage o2) { return Long.compare(o1.getTimestamp(), o2.getTimestamp()); }
@Override public int hashCode() { // NOPMD (forward hashcode) return super.hashCode(); }
@Override public String toString() { return "SYNC-RPLY " + super.toString(); } }
@Override public String toString() { final StringBuilder strBuild = new StringBuilder(); strBuild.append(this.timestamp) .append(' '); if (this.getSendingExecution().getOperation().getId() == Operation.ROOT_OPERATION_ID) { strBuild.append(SystemModelRepository.ROOT_NODE_LABEL); } else { strBuild.append(this.getSendingExecution()); } strBuild.append(" --> "); if (this.getReceivingExecution().getOperation().getId() == Operation.ROOT_OPERATION_ID) { strBuild.append(SystemModelRepository.ROOT_NODE_LABEL); } else { strBuild.append(this.getReceivingExecution()); } return strBuild.toString(); }
Assert.assertEquals("Sending execution is not root execution", call0_0___root__bookstore_searchBook.getSendingExecution(), SystemModelRepository.ROOT_EXECUTION); Assert.assertEquals(call0_0___root__bookstore_searchBook.getReceivingExecution(), this.exec0_0__bookstore_searchBook); Assert.assertEquals("Message has wrong timestamp", call0_0___root__bookstore_searchBook.getTimestamp(), this.exec0_0__bookstore_searchBook.getTin()); Assert.assertEquals(call1_1___bookstore_searchBook_catalog_getBook.getSendingExecution(), this.exec0_0__bookstore_searchBook); Assert.assertEquals(call1_1___bookstore_searchBook_catalog_getBook.getReceivingExecution(), this.exec1_1__catalog_getBook); Assert.assertEquals("Message has wrong timestamp", call1_1___bookstore_searchBook_catalog_getBook.getTimestamp(), this.exec1_1__catalog_getBook.getTin()); Assert.assertEquals(return1_1___catalog_getBook__bookstore_searchBook.getSendingExecution(), this.exec1_1__catalog_getBook); Assert.assertEquals(return1_1___catalog_getBook__bookstore_searchBook.getReceivingExecution(), this.exec0_0__bookstore_searchBook); Assert.assertEquals("Message has wrong timestamp", return1_1___catalog_getBook__bookstore_searchBook.getTimestamp(), this.exec1_1__catalog_getBook.getTout()); Assert.assertEquals(call2_1___bookstore_searchBook__crm_getOrders.getSendingExecution(), this.exec0_0__bookstore_searchBook); Assert.assertEquals(call2_1___bookstore_searchBook__crm_getOrders.getReceivingExecution(), this.exec2_1__crm_getOrders); Assert.assertEquals("Message has wrong timestamp", call2_1___bookstore_searchBook__crm_getOrders.getTimestamp(), this.exec2_1__crm_getOrders.getTin()); Assert.assertEquals(call3_2___bookstore_searchBook__catalog_getBook.getSendingExecution(), this.exec2_1__crm_getOrders); Assert.assertEquals(call3_2___bookstore_searchBook__catalog_getBook.getReceivingExecution(), this.exec3_2__catalog_getBook); Assert.assertEquals("Message has wrong timestamp", call3_2___bookstore_searchBook__catalog_getBook.getTimestamp(), this.exec3_2__catalog_getBook.getTin()); Assert.assertEquals(return3_2___catalog_getBook__crm_getOrders.getSendingExecution(), this.exec3_2__catalog_getBook); Assert.assertEquals(return3_2___catalog_getBook__crm_getOrders.getReceivingExecution(), this.exec2_1__crm_getOrders); Assert.assertEquals("Message has wrong timestamp", return3_2___catalog_getBook__crm_getOrders.getTimestamp(), this.exec3_2__catalog_getBook.getTout()); Assert.assertEquals(return2_1___crm_getOrders__bookstore_searchBook.getSendingExecution(), this.exec2_1__crm_getOrders);
@Override public void processMessage(final AbstractMessage message, final DependencyGraphNode<?> sourceNode, final DependencyGraphNode<?> targetNode, final TimeUnit timeunit) { // Ignore internal executions if (sourceNode.equals(targetNode)) { return; } final long responseTime = message.getReceivingExecution().getTout() - message.getReceivingExecution().getTin(); final int convertedResponseTime = (int) DISPLAY_TIMEUNIT.convert(responseTime, timeunit); if (convertedResponseTime > this.threshold) { targetNode.setColor(COLOR); } }
prevE = poppedCall.getReceivingExecution(); curReturnReceiver = poppedCall.getSendingExecution(); final AbstractMessage m = new SynchronousReplyMessage(prevE.getTout(), prevE, curReturnReceiver); prevE = poppedCall.getReceivingExecution(); curReturnReceiver = poppedCall.getSendingExecution(); final AbstractMessage m = new SynchronousReplyMessage(prevE.getTout(), prevE, curReturnReceiver);
@Override public void processMessage(final AbstractMessage message, final DependencyGraphNode<?> sourceNode, final DependencyGraphNode<?> targetNode, final TimeUnit timeunit) { // Ignore internal executions if (sourceNode.equals(targetNode)) { return; } ResponseTimeDecoration timeDecoration = targetNode.getDecoration(ResponseTimeDecoration.class); if (timeDecoration == null) { timeDecoration = new ResponseTimeDecoration(timeunit, this.displayTimeunit); targetNode.addDecoration(timeDecoration); } timeDecoration.registerExecution(message.getReceivingExecution()); }
final AllocationComponent senderComponent = me.getSendingExecution().getAllocationComponent(); final AllocationComponent receiverComponent = me.getReceivingExecution().getAllocationComponent(); if (!plottedComponentIds.contains(senderComponent.getId())) { ps.print("object(O" + senderComponent.getId() + ",\"" + senderComponent.getExecutionContainer().getName() + "::\",\"" final AssemblyComponent senderComponent = me.getSendingExecution().getAllocationComponent().getAssemblyComponent(); final AssemblyComponent receiverComponent = me.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); if (!plottedComponentIds.contains(senderComponent.getId())) { ps.print("object(O" + senderComponent.getId() + ",\"\",\"" + SequenceDiagramFilter.assemblyComponentLabel(senderComponent, shortLabels) + "\");" final AllocationComponent senderComponent = me.getSendingExecution().getAllocationComponent(); final AllocationComponent receiverComponent = me.getReceivingExecution().getAllocationComponent(); senderDotId = "O" + senderComponent.getId(); receiverDotId = "O" + receiverComponent.getId(); } else if (sdMode == SDModes.ASSEMBLY) { final AssemblyComponent senderComponent = me.getSendingExecution().getAllocationComponent().getAssemblyComponent(); final AssemblyComponent receiverComponent = me.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); senderDotId = "O" + senderComponent.getId(); receiverDotId = "O" + receiverComponent.getId(); final Signature sig = me.getReceivingExecution().getOperation().getSignature(); final StringBuilder msgLabel = new StringBuilder(sig.getName()); msgLabel.append('(');
/** * Creates a new message trace from the given data. * * @param traceId * The ID for this trace. * @param sessionId * The ID of the current session. * @param seq * The list of messages this trace consists of. */ public MessageTrace(final long traceId, final String sessionId, final List<AbstractMessage> seq) { super(traceId, sessionId); // no need to sort: seq is already sorted - actually // however, the reply message has the same timestamp as its associated call message // Collections.sort(seq, new MessageComparator()); this.messages = seq; // Calculate start and end timestamp long minTimestamp = Long.MAX_VALUE; long maxTimestamp = Long.MIN_VALUE; for (final AbstractMessage message : seq) { if (message.getTimestamp() < minTimestamp) { minTimestamp = message.getTimestamp(); } if (message.getTimestamp() > maxTimestamp) { maxTimestamp = message.getTimestamp(); } } this.startTimestamp = minTimestamp; this.endTimestamp = maxTimestamp; }
@Override public String toString() { return "SYNC-CALL " + super.toString(); } }
@Override public int hashCode() { // NOPMD (forward hashcode) return super.hashCode(); }
continue; final AllocationComponent senderComponent = m.getSendingExecution().getAllocationComponent(); final AllocationComponent receiverComponent = m.getReceivingExecution().getAllocationComponent(); DependencyGraphNode<AllocationComponent> senderNode = this.getGraph().getNode(senderComponent.getId()); DependencyGraphNode<AllocationComponent> receiverNode = this.getGraph().getNode(receiverComponent.getId()); this.getOriginRetentionPolicy()); if (m.getSendingExecution().isAssumed()) { senderNode.setAssumed(); this.getOriginRetentionPolicy()); if (m.getReceivingExecution().isAssumed()) { receiverNode.setAssumed();
@Override public String toString() { final StringBuilder strBuild = new StringBuilder("Trace " + this.getTraceId() + ":\n"); final Iterator<AbstractMessage> it = this.messages.iterator(); while (it.hasNext()) { final AbstractMessage m = it.next(); strBuild.append('<'); strBuild.append(m.toString()); strBuild.append(">\n"); } return strBuild.toString(); }
continue; final AllocationComponent senderComponent = m.getSendingExecution().getAllocationComponent(); final AllocationComponent receiverComponent = m.getReceivingExecution().getAllocationComponent(); final int rootOperationId = OperationRepository.ROOT_OPERATION.getId(); final Operation senderOperation = m.getSendingExecution().getOperation(); final Operation receiverOperation = m.getReceivingExecution().getOperation(); this.getOriginRetentionPolicy()); if (m.getSendingExecution().isAssumed()) { senderNode.setAssumed(); this.getOriginRetentionPolicy()); if (m.getReceivingExecution().isAssumed()) { receiverNode.setAssumed();
continue; final AssemblyComponent senderComponent = m.getSendingExecution().getAllocationComponent().getAssemblyComponent(); final AssemblyComponent receiverComponent = m.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); final int rootOperationId = OperationRepository.ROOT_OPERATION.getId(); final Operation senderOperation = m.getSendingExecution().getOperation(); final Operation receiverOperation = m.getReceivingExecution().getOperation(); this.getOriginRetentionPolicy()); if (m.getSendingExecution().isAssumed()) { senderNode.setAssumed(); this.getOriginRetentionPolicy()); if (m.getReceivingExecution().isAssumed()) { receiverNode.setAssumed();
continue; final AssemblyComponent senderComponent = m.getSendingExecution().getAllocationComponent().getAssemblyComponent(); final AssemblyComponent receiverComponent = m.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); DependencyGraphNode<AssemblyComponent> senderNode = this.getGraph().getNode(senderComponent.getId()); DependencyGraphNode<AssemblyComponent> receiverNode = this.getGraph().getNode(receiverComponent.getId()); this.getOriginRetentionPolicy()); if (m.getSendingExecution().isAssumed()) { senderNode.setAssumed(); this.getOriginRetentionPolicy()); if (m.getReceivingExecution().isAssumed()) { receiverNode.setAssumed();
continue; final AllocationComponent senderComponent = m.getSendingExecution().getAllocationComponent(); final AllocationComponent receiverComponent = m.getReceivingExecution().getAllocationComponent(); final ExecutionContainer senderContainer = senderComponent.getExecutionContainer(); final ExecutionContainer receiverContainer = receiverComponent.getExecutionContainer();