Ejemplo n.º 1
0
 /**
  * Update the trace attributes
  *
  * @param context the current trace context
  * @param timestamp the corresponding timestamp
  * @since 2.0
  */
 protected synchronized void updateAttributes(
     final ITmfContext context, final ITmfTimestamp timestamp) {
   if (fStartTime.equals(TmfTimestamp.BIG_BANG) || (fStartTime.compareTo(timestamp, false) > 0)) {
     fStartTime = timestamp;
   }
   if (fEndTime.equals(TmfTimestamp.BIG_CRUNCH) || (fEndTime.compareTo(timestamp, false) < 0)) {
     fEndTime = timestamp;
   }
   if (context.hasValidRank()) {
     long rank = context.getRank();
     if (fNbEvents <= rank) {
       fNbEvents = rank + 1;
     }
     if (fIndexer != null) {
       fIndexer.updateIndex(context, timestamp);
     }
   }
 }