コード例 #1
0
ファイル: TmfTrace.java プロジェクト: TheZorg/linuxtools
 /**
  * Signal handler for the TmfTraceUpdatedSignal signal
  *
  * @param signal The incoming signal
  * @since 3.0
  */
 @TmfSignalHandler
 public void traceUpdated(final TmfTraceUpdatedSignal signal) {
   if (signal.getSource() == getIndexer()) {
     fNbEvents = signal.getNbEvents();
     fStartTime = signal.getRange().getStartTime();
     fEndTime = signal.getRange().getEndTime();
   }
 }
コード例 #2
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;
     }
   }
 }