components/global/core/io.cellery.observability.model.generator/src/main/java/io/cellery/observability/model/generator/TraceGroupWindowProcessor.java
private void currentTraceTimeout(long eventTimestamp) {
        Collection<TraceGroup> traceGroupList = traceGroupMap.values();
        TreeSet<TraceGroup> currentEndTimestamps = new TreeSet<>(traceGroupList);
        for (TraceGroup aTraceGroup : currentEndTimestamps) {
            long traceEndTime = aTraceGroup.getEndTimestamp();
            if (eventTimestamp >= traceEndTime) {
                synchronized (aTraceGroup.getKey().intern()) {
                    TraceGroup currentTraceGroup = traceGroupMap.get(aTraceGroup.getKey());
                    ComplexEventChunk<StreamEvent> events = currentTraceGroup.getCurrentTraceGroup();
                    if (events.getFirst() != null) {
                        expiredEventChunk.add(events.getFirst());
                        currentTraceGroup.clear();
                    }
                    traceGroupMap.remove(aTraceGroup.getKey());
                }
            } else {
                break;
            }
        }
    }
/**
     * Checks all the traces and get the expired trace.
     */
Checks all the traces and get the expired trace.
Checks all the traces and get the expired trace .
private void currentTraceTimeout(long eventTimestamp) {
        Collection<TraceGroup> traceGroupList = traceGroupMap.values();
        TreeSet<TraceGroup> currentEndTimestamps = new TreeSet<>(traceGroupList);
        for (TraceGroup aTraceGroup : currentEndTimestamps) {
            long traceEndTime = aTraceGroup.getEndTimestamp();
            if (eventTimestamp >= traceEndTime) {
                synchronized (aTraceGroup.getKey().intern()) {
                    TraceGroup currentTraceGroup = traceGroupMap.get(aTraceGroup.getKey());
                    ComplexEventChunk<StreamEvent> events = currentTraceGroup.getCurrentTraceGroup();
                    if (events.getFirst() != null) {
                        expiredEventChunk.add(events.getFirst());
                        currentTraceGroup.clear();
                    }
                    traceGroupMap.remove(aTraceGroup.getKey());
                }
            } else {
                break;
            }
        }
    }
private void currentTraceTimeout ( long eventTimestamp ) { Collection < TraceGroup > traceGroupList = traceGroupMap . values ( ) ; TreeSet < TraceGroup > currentEndTimestamps = new TreeSet < > ( traceGroupList ) ; for ( TraceGroup aTraceGroup : currentEndTimestamps ) { long traceEndTime = aTraceGroup . getEndTimestamp ( ) ; if ( eventTimestamp >= traceEndTime ) { synchronized ( aTraceGroup . getKey ( ) . intern ( ) ) { TraceGroup currentTraceGroup = traceGroupMap . get ( aTraceGroup . getKey ( ) ) ; ComplexEventChunk < StreamEvent > events = currentTraceGroup . getCurrentTraceGroup ( ) ; if ( events . getFirst ( ) != null ) { expiredEventChunk . add ( events . getFirst ( ) ) ; currentTraceGroup . clear ( ) ; } traceGroupMap . remove ( aTraceGroup . getKey ( ) ) ; } } else { break ; } } }
Checks all the traces and get the expired trace.
Checks all the traces and get the expired trace .