@Override public int compare(final AbstractTrace o1, final AbstractTrace o2) { final long endTimestamp1 = o1.getEndTimestamp(); final long endTimestamp2 = o2.getEndTimestamp(); if (endTimestamp1 == endTimestamp2) { return 0; } else if (endTimestamp1 < endTimestamp2) { return -1; } else { return 1; } }
@Override public int compare(final AbstractTrace o1, final AbstractTrace o2) { final long startTimestamp1 = o1.getStartTimestamp(); final long startTimestamp2 = o2.getStartTimestamp(); if (startTimestamp1 == startTimestamp2) { return 0; } else if (startTimestamp1 < startTimestamp2) { return -1; } else { return 1; } }
/** * {@inheritDoc} */ @Override // NOCS requests implementation of equals and hashCode in pairs public int hashCode() { // NOCS requests implementation of equals and hashCode in pairs // On purpose, we are not considering the sessionId here return (int) (this.getTraceId() ^ (this.getTraceId() >>> 32)); }
@Override public int hashCode() { // NOPMD (forward hashcode) return super.hashCode(); }
@Override public int hashCode() { // NOPMD (forward hashcode) return super.hashCode(); }
@Override @InputPort(name = AbstractMessageTraceProcessingFilter.INPUT_PORT_NAME_MESSAGE_TRACES, description = "Receives the message traces to be processed", eventTypes = { MessageTrace.class }) public void inputMessageTraces(final MessageTrace mt) { try { SequenceDiagramFilter.writePicForMessageTrace(mt, SequenceDiagramFilter.this.sdmode, SequenceDiagramFilter.this.outputFnBase + "-" + ((AbstractTrace) mt).getTraceId() + ".pic", SequenceDiagramFilter.this.shortLabels); SequenceDiagramFilter.this.reportSuccess(((AbstractTrace) mt).getTraceId()); } catch (final FileNotFoundException ex) { SequenceDiagramFilter.this.reportError(((AbstractTrace) mt).getTraceId()); this.logger.error("File not found", ex); } catch (final UnsupportedEncodingException ex) { SequenceDiagramFilter.this.reportError(((AbstractTrace) mt).getTraceId()); this.logger.error("Encoding not supported", ex); } }