Esempio n. 1
0
 @TmfSignalHandler
 public void traceUpdated(TmfTraceUpdatedSignal signal) {
   for (ITmfTrace<T> trace : fTraces) {
     if (trace == signal.getTrace()) {
       synchronized (fCheckpoints) {
         if (fIndexing) {
           if (fIndexingPendingRange == TmfTimeRange.Null) {
             fIndexingPendingRange = signal.getRange();
           } else {
             TmfTimestamp startTime = fIndexingPendingRange.getStartTime();
             TmfTimestamp endTime = fIndexingPendingRange.getEndTime();
             if (signal.getRange().getStartTime().compareTo(startTime) < 0) {
               startTime = signal.getRange().getStartTime();
             }
             if (signal.getRange().getEndTime().compareTo(endTime) > 0) {
               endTime = signal.getRange().getEndTime();
             }
             fIndexingPendingRange = new TmfTimeRange(startTime, endTime);
           }
           return;
         }
       }
       indexExperiment(false, (int) fNbEvents, signal.getRange());
       return;
     }
   }
 }
Esempio n. 2
0
  /** Update the global time range */
  protected void updateTimeRange() {
    TmfTimestamp startTime =
        fTimeRange != TmfTimeRange.Null ? fTimeRange.getStartTime() : TmfTimestamp.BigCrunch;
    TmfTimestamp endTime =
        fTimeRange != TmfTimeRange.Null ? fTimeRange.getEndTime() : TmfTimestamp.BigBang;

    for (ITmfTrace<T> trace : fTraces) {
      TmfTimestamp traceStartTime = trace.getStartTime();
      if (traceStartTime.compareTo(startTime, true) < 0) startTime = traceStartTime;
      TmfTimestamp traceEndTime = trace.getEndTime();
      if (traceEndTime.compareTo(endTime, true) > 0) endTime = traceEndTime;
    }
    fTimeRange = new TmfTimeRange(startTime, endTime);
  }
Esempio n. 3
0
 @Override
 public TmfTimestamp getEndTime() {
   return fTimeRange.getEndTime();
 }