/** * Processes an incoming execution. * * @param executionTrace * The execution trace to process. */ @InputPort(name = INPUT_PORT_NAME_EXECUTION_TRACES, description = "Receives execution traces", eventTypes = { ExecutionTrace.class }) public void processExecutionTrace(final ExecutionTrace executionTrace) { synchronized (this) { // Purge timed-out sessions before processing the next trace final long currentTimestamp = executionTrace.getStartTimestamp(); this.processTimeouts(currentTimestamp, OUTPUT_PORT_NAME_EXECUTION_TRACE_SESSIONS, this.executionSessionTimeoutQueue, this.openExecutionBasedSessions); // Add the trace to the appropriate session and create it if necessary boolean existingSession = true; final String sessionId = executionTrace.getSessionId(); ExecutionTraceBasedSession session = this.openExecutionBasedSessions.get(sessionId); if (session == null) { session = new ExecutionTraceBasedSession(sessionId); final ExecutionTraceBasedSession previousSession = this.openExecutionBasedSessions.putIfAbsent(sessionId, session); existingSession = previousSession != null; } session.addTrace(executionTrace); // Update the changed session's position in the timeout queue if (existingSession) { this.executionSessionTimeoutQueue.remove(session); } this.executionSessionTimeoutQueue.add(session); } }
mt = new MessageTrace(this.getTraceId(), this.getSessionId(), mSeq); this.messageTrace.set(mt); return mt;
final ExecutionTrace completingExecutionTrace = new ExecutionTrace(incompleteExecutionTrace.getTraceId(), incompleteExecutionTrace.getSessionId()); Assert.assertTrue("Test invalid (traceIds not matching)", this.exec0_0__bookstore_searchBook.getTraceId() == completingExecutionTrace.getTraceId()); completingExecutionTrace.add(this.exec0_0__bookstore_searchBook);
final ExecutionTrace trace1 = new ExecutionTrace(trace0.getTraceId(), trace0.getSessionId()); for (final Execution execFromTrace0 : trace0.getTraceAsSortedExecutionSet()) { final Execution execToAddToTrace1;