*/
@Override
public synchronized ITmfEvent readNextEvent(final ITmfContext context) {
- // parseEvent() does not update the context
+ final ITmfContext previousContext = (TmfExperimentContext) context.clone();
final ITmfEvent event = parseEvent(context);
if (event != null) {
- updateAttributes(context, event.getTimestamp());
+ updateAttributes(previousContext, event.getTimestamp());
TmfExperimentContext expContext = (TmfExperimentContext) context;
int trace = expContext.getLastTrace();
/**
* The basic trace context structure in TMF. The purpose of the context is to
- * associate a trace location to an event of a specific rank (order).
+ * associate a trace location to an event at a specific rank (order).
* <p>
* The context should be sufficient to allow the trace to position itself so
- * that performing a trace read operation will yield the corresponding event.
+ * that performing a trace read operation will yield the corresponding 'nth'
+ * event.
*
* @version 1.0
* @author Francois Chouinard
// ------------------------------------------------------------------------
/**
- * @return the rank of the event referred to by the context
+ * @return the rank of the event at the context location
*/
public long getRank();
/**
- * @return the location of the event referred to by the context
+ * @return the location of the event at the context rank
*/
public ITmfLocation<? extends Comparable<?>> getLocation();